On Fri, Nov 19, 2010 at 6:18 AM, Peter Karich <[email protected]> wrote:
>  Hi Robert,
>
> thanks a lot! I will try a newer solr version for other reasons then I will
> try your suggested option too!
> (I will repost your solution to the user mailing list if that is ok for you
> ...)

yes, please do!

>
> Where can I find more info about phrasequeries? I only found*
> I mean, how does MultiPhraseQuery selects its documents for (tw:"(abc a)
> bc") ?

the multiphrasequery is just like a more general phrase query.

a phrase query for "abc bc" looks for "abc" in the document, followed by "bc"
a multiphrasequery for "(abc a) bc" looks for ("abc OR a") in the
document, followed by "bc".

this is also the same way synonyms work with phrase queries.
imagine you have a synonyms file that looks like this:
dog => dog, dogs
food => food, chow

then if a user types "dog food", the resulting query is a
multiphrasequery of "(dog dogs) (food chow)"
this matches all 4 possibilities:
dog food
dogs food
dog chow
dogs chow

for more information, you can see the code to this query here:
http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MultiPhraseQuery.java

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to