lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Search Across All Fields
Date Sat, 17 Jan 2009 00:00:41 GMT
I think you forgot a set of parentheses, a close paren right before
the AND and an open paren right after AND

Depending upon how big your index is, a MUCH easier way to do
this is to index another field, call it all_text say, and add all your
terms to that field as well as to the individual one, then search your
all_text field instead....

Best
Erick

On Fri, Jan 16, 2009 at 6:02 PM, Jamie <jamie@stimulussoft.com> wrote:

> Hi Everyone
>
> I have two queries:
>
> Query 1
> ======
>
> (attachments:"beauty supply") AND sentdate:[d20081117010000 TO
> d20090117235900]
>
> Query 2
> ======
>
> (priority:beauty attach:beauty score:beauty size:beauty sentdate:beauty
> archivedate:beauty receiveddate:beauty from:beauty to:beauty subject:beauty
> cc:beauty bcc:beauty deliveredto:beauty flag:beauty sensitivity:beauty
> sender:beauty recipient:beauty body:beauty attachments:beauty
> attachname:beauty AND priority:supply attach:supply score:supply size:supply
> sentdate:supply archivedate:supply receiveddate:supply from:supply to:supply
> subject:supply cc:supply bcc:supply deliveredto:supply flag:supply
> sensitivity:supply sender:supply recipient:supply body:supply
> attachments:supply attachname:supply) AND sentdate:[d20081117010000 TO
> d20090117235900]
>
> Query 1 returns 138 results, while Query 2 return 0 result. Any idea why?
> The second query is meant to offer the search across all fields, whereas the
> first query specifies one field. Is there a better way to conduct a search
> across all fields? Am I missing something?
>
> Thanks in advance for your help!
>
> Regards,
>
> Jamie
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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