lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: How to rename fields in an index
Date Wed, 22 Aug 2007 15:26:58 GMT

On Aug 22, 2007, at 11:02 AM, Antoine Baudoux wrote:
> In fact I need this change just for the Query parser class, to be  
> able to make queries such as kw:blah. Now my field is called  
> "org.mycompany.mediafield.keyword". Not very easy to make queries  
> with this field name!
>
>
>  It would be cool if QueryParser had some sort of field name  
> aliasing functionality, so that kw:blah is automatically translated  
> into  org.mycompany.mediafield.keyword:blah

You could, instead, do a string substitution on the string the user  
enters and replace "kw:" with something else.  That'd be quick and  
dirty and probably pretty robust too.

However, it is a good point about allowing QueryParser a way to  
translate field names.  A patch along these lines would be well  
received, I think.

	Erik


---------------------------------------------------------------------
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