lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Bogan" <krazed...@gmail.com>
Subject regex expressions within phrase queries
Date Fri, 15 Feb 2008 00:25:33 GMT
I would like to be able to handle the following:

"/\d\d\d{4} \\d\\d/ office"

Where / indicates a regex expression phrase.

One option is extending MultiFieldQueryParser and catching the phrase within
getFieldQuery evaluating whether /, the regex identifier, is present and
then returning a  SpanNearQuery  comprising of  SpanQueries.

I was wondering if anyone has a more efficient method for achieving this.
Would changing QueryParser.jj and developing a custom PhraseQuery class be a
good idea?  Any comments would be appreciated.

Keith Player

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message