lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: query parser field name aliases
Date Mon, 05 Jun 2006 00:42:48 GMT

On Jun 4, 2006, at 5:57 PM, karl wettin wrote:
> I was thinking it could be nice if the query parser handled aliases by
> passing a Map to the parser. The data could be compiled from the  
> index.
> "name", "nam", "na" and "n" all trigger on "name", taking there is no
> other field starting with an "n".
> Did anyone implement this, or should I hack one up?

Rather than hacking QueryParser, simply do some regex replaces on the  
string before handing it to parser.  n:karl would get replaced with  
name:karl.  ([a-z]*)\: replaced with the field name that matches $1.


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

View raw message