lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maik Schreiber <>
Subject Re: Question regarding boosting
Date Sat, 21 May 2005 00:28:59 GMT
> +entity:product +(name:"audio cable"^2.0 content:"audio cable")

Looks good to me. This query would only return products where either name or
content matches "audio cable" (or both), and name matches get a higher score.

> Also I saw that
> my OR gets represented as a blank in the query. Is that fine?

Yes. Actually each BooleanClause can have a required (+) or prohibited (-)
mode. That's why the following expansions take place:

- x AND y -> +x +y
- x OR y -> x y
- x AND NOT y -> +x -y (off the top of my head)

I for one prefer to use +/- syntax instead of AND/OR because those I find

> The results from executing this query seem alright, but is this a good
> way of achieving the results I was trying to achieve? (NOTE: My original
> post explains what I am trying to do).

I have tried to explain your query with my own words. See for yourself if
they match :)

Aside from all that, did you really want to query for the _phrase_ "audio
cable"? Perhaps you wanted the words "audio" and "cable" to appear anywhere
in the fields, but not necessarily as a phrase.

Maik Schreiber   *

GPG public key:
Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640 1F11 D713

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

View raw message