I've also got to ask a similar question to Michael's... Who is the UI intended for? If it's intended for any type of "end user", even other IT folks, who aren't Lucene junkies, trying to explain when colon's count and when they don't is going to be a challenge. I predict it will lead to 1> endless confusion and 2> waaaaaay more time spent than you think and 3> little value actually added to the app.
I think that rather than spending time worrying about this issue, I'd define it away by removing colon's from my token stream while indexing and causing every colon in my free-form text to be a field. Unless I just took away the field:value syntax from the free-form entry field entirely..... Erick On 11/22/06, Michael Rusch <[EMAIL PROTECTED]> wrote:
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]