great suggestion and Eric's also earlier. Thank you. Felix "Michael D. Curtin" <[EMAIL PROTECTED]> wrote: 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?
The StandardAnalyzer already strips out the colons from the indexed text, so all you need to do is get rid of them in the query. Would String newquery = query.replace(query, ":", " "); work? It uses a space as the new text so that two query words that happened to be separated by the colon would still be separate words ... --MDC --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]