lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jagdish Vasani <>
Subject RE: teragram to Lucene
Date Mon, 18 Jul 2011 11:42:07 GMT
See the surround query in lucene/contrib.
It support proximity search ....query syntax is diff..but you can customize it.
By customizing javacc language file-"QueryParser .jj" you can get as you wish.


-----Original Message-----
From: Walt [] 
Sent: Friday, July 15, 2011 8:31 PM
Subject: teragram to Lucene

    I am responsible for moving a Teragram application to Lucene. I have
identified the following issues so I would like verification that what
the existing rules have do not exist in Lucene or there is a work-around.

1) Teragram uses a Polish Notation for its rules, i.e.
Note: DIST_2 is a proximity of within 2 words

DIST_2     (OR (phrase1, phrase 2, .... phrase 20)
                (OR(phrasea, phraseb, phrase c)

This says "if any phrase in this group is within 2 words of any phrase
in the second group".

My understanding is proximity in Lucene is only against individual
phrases, not between two groups. Is there any way to do the functional
equivalent short of

"phrase1 phrasea"~2 "phrase1 phraseb"~2 "phrase2 phrasea"~2 "phrase2
phraseb"~2 etc

The other question I have is "is there a notion of a sentence such that
one could say do these word occur in the same sentence?


Walt Corey

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

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

View raw message