lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prad Nelluru <>
Subject RE: Negative Wildcard Queries
Date Fri, 31 Oct 2014 17:17:15 GMT

Is it possible to say -"hello world"* ?

-----Original Message-----
From: Erick Erickson [] 
Sent: Thursday, October 30, 2014 10:15 PM
To: java-user
Subject: Re: Negative Wildcard Queries

Actually, "hello world*" is possible with the ComplexPhraseQueryParser as of 4.8, see SOLR-1604
(yeah, it's been hanging around for a while).

But to your question: Just prefix it with *:*, i.e. q=*:* -hello*


On Thu, Oct 30, 2014 at 6:29 PM, Prad Nelluru <> wrote:
> Hi all,
> Is it possible to query Lucene with a negative wildcard query like: -hello*? I know wildcards
aren't allowed inside phrase queries, so -"hello world*" isn't possible.
> Thanks,
> Prad

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

View raw message