Yes. thank you. How did you make that modification not to treat ":" as a field-name terminator?
Is it using this Or some other way? String newquery = query.replace(query, ":", " "); Thank you, Felix Antony Bowesman <[EMAIL PROTECTED]> wrote: Not sure if you're still after a solution, but I had a similar issue and I modified QueryParser.jj to not treat : as a field name terminator, so work: would then just be given as work: to the analyzer and treated as a search term. Antony Felix Litman wrote: > We want to be able to return a result regardless if users use a colon or not > in the query. So 'work:' and 'work' query should still return same result. > > With the current parser if a user enters 'work:' with a ":" , Lucene does > not return anything :-(. It seems to me the Lucene parser issue.... we are > wondering if there is any simple way to make the Lucene parser ignore the ":" > in the query? > > any thoughts? > > Erick Erickson wrote: I've got to ask why you'd want to search on colons. > Why not just index the > words without colons and search without them too? Let's say you index the > word "work:" Do you really want to have a search on "work" fail? > > By and large, you're better off indexing and searching without > punctuation.... > > Best > Erick > > On 1/28/07, Felix Litman wrote: >> Is there a simple way to turn off field-search syntax in the Lucene >> parser, and have Lucene recognize words ending in a colon ":" as search >> terms instead? >> >> Such words are very common occurrences for our documents (or any plain >> text), but Lucene does not seem to find them. :-( >> >> Thank you, >> Felix >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]