lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Litman <>
Subject Re: search on colon ":" ending words
Date Fri, 23 Feb 2007 04:37:58 GMT
OK. Thank you.  We'll have to consider using this approach.
  I guess the drawback here is that ":" will not longer work as a field operator. ?:-(
  We were also considering using the following approach.
  String newquery = query.replace(query, ": ", " "); 
  It seems this way a colon should still work as a field operator if followed by a query term
with no space in between
Antony Bowesman <> wrote:
  Felix Litman wrote:
> 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?

I removed the : handling stuff from QueryParser.jj in the method:

Query Clause(String field) :

I removed this section
fieldToken= {field=discardEscapeChar(fieldToken.image);}
| {field="*";}

and you can also remove the COLON and : related bits to do with start terms and 
escaped chars if you want to exclude treating : as a separator, but from memory, 
it's the above section that does the field recognition.


To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message