You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ghinwa Choueiter <gh...@csail.mit.edu> on 2008/03/01 22:06:31 UTC

searching for "Nothing"

Hi,

I am trying to do a search as follows (this is a very simplified example):

I want to search for: (1) the little boy or (2) one little boy or (3) little boy

Can I write the query as:
"the OR one OR "" " AND "little" AND "boy"

note that what I mean by "" is "Nothing". 

thank you,
-Ghinwa

PS. I know that I can write the query as "the little boy" OR "one little boy" OR "little boy"


Re: searching for "Nothing"

Posted by Daniel Noll <da...@nuix.com>.
On Monday 03 March 2008 05:40:39 Ghinwa Choueiter wrote:
> thank you. You were right. Indexing by "" does not do what I need.
>
> How would one represent a null index? Perhaps another way of asking the
> question is what query would return to me all the documents in the
> database (all-pass filter).

That's easy: MatchAllDocsQuery (query parser syntax: *:*)

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: searching for "Nothing"

Posted by Ghinwa Choueiter <gh...@csail.mit.edu>.
thank you. You were right. Indexing by "" does not do what I need.

How would one represent a null index? Perhaps another way of asking the 
question is what query would return to me all the documents in the
database (all-pass filter).

thank you for your patience!
-Ghinwa

----- Original Message ----- 
From: "Erick Erickson" <er...@gmail.com>
To: <ja...@lucene.apache.org>
Sent: Sunday, March 02, 2008 8:36 AM
Subject: Re: searching for "Nothing"


> The best and most deterministic way to answer this kind of question is
> to download Luke and look at the explained query. That'll show you
> exactly what the effect of different analyzers and the exact structure
> of the resulting query.
>
> Offhand, I don't think your rewrite will work.
>
> Best
> Erick
>
> On Sat, Mar 1, 2008 at 4:06 PM, Ghinwa Choueiter <gh...@csail.mit.edu>
> wrote:
>
>> Hi,
>>
>> I am trying to do a search as follows (this is a very simplified 
>> example):
>>
>> I want to search for: (1) the little boy or (2) one little boy or (3)
>> little boy
>>
>> Can I write the query as:
>> "the OR one OR "" " AND "little" AND "boy"
>>
>> note that what I mean by "" is "Nothing".
>>
>> thank you,
>> -Ghinwa
>>
>> PS. I know that I can write the query as "the little boy" OR "one little
>> boy" OR "little boy"
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: searching for "Nothing"

Posted by Erick Erickson <er...@gmail.com>.
The best and most deterministic way to answer this kind of question is
to download Luke and look at the explained query. That'll show you
exactly what the effect of different analyzers and the exact structure
of the resulting query.

Offhand, I don't think your rewrite will work.

Best
Erick

On Sat, Mar 1, 2008 at 4:06 PM, Ghinwa Choueiter <gh...@csail.mit.edu>
wrote:

> Hi,
>
> I am trying to do a search as follows (this is a very simplified example):
>
> I want to search for: (1) the little boy or (2) one little boy or (3)
> little boy
>
> Can I write the query as:
> "the OR one OR "" " AND "little" AND "boy"
>
> note that what I mean by "" is "Nothing".
>
> thank you,
> -Ghinwa
>
> PS. I know that I can write the query as "the little boy" OR "one little
> boy" OR "little boy"
>
>