lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Syntax question
Date Wed, 30 Dec 2015 22:27:23 GMT
I think you can come close with

NOT "received this e-mail in error privilege"~8

(or some other slop factor than 8)

This isn't quite what you're asking for as it would also exclude
docs with
"received privilege this e-mail error in"
in the field. Although i suppose

NOT "received this e-mail in error privilege"~8 AND "received this
e-mail in error"

would do as it would require that the words "received this e-mail in
error" be in the
the field....

If that's not good enough, perhaps look at ComplexPhraseQueryParser
might work for you.

On Wed, Dec 30, 2015 at 12:46 PM, Brian V Zayas <> wrote:
> Hello-
> I'm trying to configure a search that captures a term but excludes search
> results that contain that same term if the term only appears in proximity
> to certain other terms.  See the below example.  I want to get search
> results for emails that contain the word "privilege".  But I don't want to
> get hits if privilege only appears within a certain proximity of a
> specified phrase (such as within the sample confidentiality footer text
> below).  Stated differently, a document should be captured in search
> results if it contains the word privilege, independent and regardless of
> whether it appears in the email confidentiality footer--but not if it only
> appears in the footer.
> Here is how it would look in dtSearch.  I'm just wondering how to
> accomplish the same thing with Lucene.
> Footer text:
> “… protected by attorney-client or other privilege.  If you received this
> e-mail in error….”
> Search:
> ((privilege) not w/4 (“received this e-mail in error”))
> Thanks in advance!
> Brian V. Zayas
> Litigation Support Project Manager
> JONES DAY® - One Firm Worldwide℠
> 1755 Embarcadero Road
> Palo Alto, CA 94303
> Office +1.650.739.3973 (Silicon Valley)
> Office +1.415.875.5718 (San Francisco)
> ==========
> This e-mail (including any attachments) may contain information that is
> private, confidential, or protected by attorney-client or other privilege.
>  If you received this e-mail in error, please delete it from your system
> without copying it and notify sender by reply e-mail, so that our records
> can be corrected.
> ==========

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

View raw message