Take the 2-minute tour ×

i have written an search using lucene and i have done some boost while getting the values

say ex 
i have an url,content,title,host values of an webpage

record 1

content: example is good in lucene and bla bla
title: welcome to example

record 2:
url :http://example.com/
content:example is one of best solution
title :welcome to example

if i search for example it returns the two results as and i need the record2 as first result because what ever i boost url or host both gets same boost value ..

share|improve this question
which record is ranked higher? Are you saying they both have the same score? Without trying it myself, I would guess that record 1 is ranked higher, because tf=5 for record 1, and tf=4 for record 2 ("example" appears twice in record1 url). –  Kevin Feb 25 '11 at 15:30
Please specify how you indexed the specific fields, which Analyzer you used and why you expect the second record to appear first in the search. –  Yuval F Feb 27 '11 at 7:08

Your Answer



Browse other questions tagged or ask your own question.