lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Re: a search like Google
Date Fri, 13 Feb 2004 19:22:38 GMT
On Friday 13 February 2004 07:43, Morus Walter wrote:

> If you want to use query parser you can parse the query with different
> default fields, set boost factors on the resulting queries and join them
> with a boolean query.
> This will give you
> (+title:i +title:love +title:lucene)^2 (+author:i +author:love
> +author:lucene) (+content:i +content:love +content:lucene)

This will not match documents that contain only "I love" in the title and 
"lucene" in the body. Doesn't seem like a problem for this example, as it 
looks like a phrase query, but I don't think that this is Google's 
behavior. I worked around that by prepending the title to the body field. 
Let me know if someone has a better solution.

The "correct" query would have to look something like this (leavon out the 

+(title:i body:i) +(title:love body:love) +(title:lucene body:lucene)



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message