Skip to content

Commit

Permalink
added a boost on appearance of combined words (in the same order the
Browse files Browse the repository at this point in the history
user submitted that) when searching for more than one word
  • Loading branch information
Orbiter committed Jan 30, 2014
1 parent 0b88137 commit 416481c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/net/yacy/search/query/QueryParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ private SolrQuery solrTextQuery(final boolean getFacets, final boolean excludein

String bq = ranking.getBoostQuery();
String bf = ranking.getBoostFunction();
if (this.queryGoal.getIncludeSize() > 1) {
// add boost on combined words
if (bq.length() > 0) bq += " ";
bq += CollectionSchema.text_t.getSolrFieldName() + ":\"" + this.queryGoal.getIncludeString() + "\"^10";
}
if (bq.length() > 0) params.setParam("bq", bq);
if (bf.length() > 0) params.setParam("boost", bf); // a boost function extension, see http://wiki.apache.org/solr/ExtendedDisMax#bf_.28Boost_Function.2C_additive.29

Expand Down

0 comments on commit 416481c

Please sign in to comment.