lucene.net - Sitecore Search Lucene Ranking -


how can set priority of fields when i'm searching lucene .net

for example have :

item 1          field 1 =contain "search text"          field 2 ="bla bla" item 2          field 1 = "loren ipsun"          field 2 = contain "search text" 

what should have on results, top item : item 1 first list, item 2 second one,etc.

i think understand question. want have hits on specific field boosted more on field , can use boostfactor. can boost query using search in field one. example if use query qryname = queryparser.parse(keyword) can following:

qryname.setboost(1000f); 

this boost hits on specific part of search specified in query. should therefor use 2 query's both fields , boost first query in search field 1. can vary in boostfactor untill suits needs.

hope helps ;)


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -