lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Maisonneuve" <n.maisonne...@hotpop.com>
Subject a search like Google
Date Fri, 13 Feb 2004 00:41:47 GMT
hy, 
i have a index with the fields :
title 
author
content 

i would make the same search type than Google  ( a form with a textfiel). When the user search
"i love lucene" (it's not a phrase query  but just the text in the textfield ), i would like
search  in all the index fields but with a specific weight boost for each field. In this example
title weight=2, author=1 content=1

the results would be (i suppose  the default operator is "and") :  (title:i^2 author:i content:i)
+(title:love^2 author:love content:love) +(title:lucene^2 author:lucene content:lucene)

but must i modify the QueryParser  or is there a different way for do this ?
( because i modified the QueryParser and it's work but if there is a cleaner way to do this
, i take it ! )

nicolas maisonneuve




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message