lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Baudoux ...@taktik.be>
Subject Re: How to rename fields in an index
Date Wed, 22 Aug 2007 15:44:35 GMT
I really don't like the dirty solution ;-)

I could come up with a patch if many are interested in this.

What do you like be the best : patching QueryParser ,or a new  
QueryParser subclass ?

--
Antoine Baudoux
Development Manager
ab@taktik.be
Tél.: +32 2 333 58 44
GSM: +32 499 534 538
Fax.: +32 2 648 16 53


On 22 Aug 2007, at 17:26, Erik Hatcher wrote:

>
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message