lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: query parser field name aliases
Date Mon, 05 Jun 2006 01:38:39 GMT

: Indeed!  I agree - I was temporarily blinded by the desire to hack
: QueryParser itself in perhaps a one-off way that I didn't consider
: the subclassing option.

if all you care about is aliasing term, and phrase queries yiu might even
be able to use the DisjunctionMaxQueryParser i wrote for Solr verbatim.

It maps from a single alias to a list of fields with unique boosts (and a
tiebreaker value) to build a DisjunctionMaxQuery for each input term --
but if you only alis to one field then the DisMax queries will rewrite to
their sole clause.

if you also want wildcards and range queries to work you'd have to
override those methods appropriately as well

It's near the bottom of this file...

http://svn.apache.org/viewvc/incubator/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java?view=markup



-Hoss


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


Mime
View raw message