lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject Re: phrase search - problem
Date Mon, 03 May 2010 07:55:14 GMT
> I wanted to do phrase search.  What are the analyzers
> that best suited for phrase search.  I tried with
> "textgen", but it did not yield the expected results.
> I wanted to index:
> my dear friend
> If I search for "dear friend", I should get the result and
> if I search for "friend dear" I should not get any records.

Default PhraseQuery is unordered. "dear friend" returns documents containing "friend dear".
It is not about Analyzer but QueryParser. So you want ordered phrase queries. With SOLR-1604
you can accomplish what you want. It constructs ordered SpanNearQuery instead of PhraseQuery.

For example features:"stick memory" returns this snippet:

SmartMedia, Memory <em>Stick</em>, <em>Memory</em> Stick Pro, SD Card



View raw message