Sorry if I'm missing the point here, but what about simply replacing colons with spaces first?
Michael. > -----Original Message----- > From: Antony Bowesman [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 21, 2006 10:01 PM > To: java-user@lucene.apache.org > Subject: Re: Limiting QueryParser > > Mark Miller wrote: > > if you scan the query and escape all colons (ie \:) then you should be > > good (I have not verified). Of course you will not be able to do a field > > search, but that seems to be what your after. > > Thanks for that suggestion. However, a standard un-escaped parse gives > > Input - important:conference agenda > Query - important:conference body:agenda > > Escaping the : gives > > Input - important\:conference agenda > Query - subject:"important conference" subject:agenda > > which has caused it to generate a PhraseQuery for important conference > which is > incorrect. > > The following > > Input - important\:"conference agenda" > Query - subject:important subject:"conference agenda" > > is correct. Is that a bug in the middle one? > Antony > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]