Might another option be to wrap IndexReader? Something similar to this in principle: https://issues.apache.org/jira/browse/LUCENE-835
----- Original Message ---- From: Antoine Baudoux <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Wednesday, 22 August, 2007 4:44:35 PM Subject: Re: How to rename fields in an index 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ___________________________________________________________ Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]