lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: WordDelimiterFilter bug
Date Fri, 19 Nov 2010 10:16:52 GMT
On Fri, Nov 19, 2010 at 5:12 AM, Peter Karich <peathal@yahoo.de> wrote:
>  Hi Robert,
>
>>  QueryGenerator^H^H^HParser
>
> Thanks for the hint. I should have done a "debugQuery=on" earlier ... sorry.
>
> But how can I get: <str name="parsedquery">tw:abc tw:a tw:bc
> instead of: "parsedquery">MultiPhraseQuery(tw:"(abc a) bc")
> for the query "aBc" ?
>

If you are using Solr branch_3x or trunk, you can turn this off, by
setting autoGeneratePhraseQueries to false in the fieldType.
<fieldType name="text" class="solr.TextField"
positionIncrementGap="100" autoGeneratePhraseQueries="false">
By enabling this option, phrase queries are only created by the
queryparser when you enclose stuff in double quotes.

If you are using an older version of solr such as 1.4.x, then you can
only hack it, by adding a PositionFilterFactory to the end of your
query analyzer.
The downside to that approach (unfortunately the only approach, for
older versions) is that it completely disables phrasequeries across
the board for that field type.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message