Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 82327 invoked from network); 17 Jan 2009 00:01:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jan 2009 00:01:19 -0000 Received: (qmail 16936 invoked by uid 500); 17 Jan 2009 00:01:11 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 16912 invoked by uid 500); 17 Jan 2009 00:01:11 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 16901 invoked by uid 99); 17 Jan 2009 00:01:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jan 2009 16:01:11 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 74.125.44.30 as permitted sender) Received: from [74.125.44.30] (HELO yx-out-2324.google.com) (74.125.44.30) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Jan 2009 00:01:03 +0000 Received: by yx-out-2324.google.com with SMTP id 3so700728yxj.5 for ; Fri, 16 Jan 2009 16:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=LNxmkUmb/6VdjnLVarfpBC7vBQ+JfIYZwZFS8iGxRAc=; b=CmifT8oP8Rktf557uwHks9fLVbXq+RrXOcZMzQI2NCx5esnrK2ww1mB8MwWQywYnU1 alexNnzLHZLPN+lbbqu6AgfQnE6yB+2DMhw3zbJPu0xkEXreQyWTggAidM7yPEWIbaZv 0sfnBwg4aFif1pW7s+Fd9eDNSocCPALPxnAGo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=oI8LWB1Fjg0p8heRZTPgAPI6rb0zOHHHlZXcUXe6x3PF0dhCgN2P4b5v4hMT/CDpJ+ wqWBY9I9axRapIF8gjdMPzF/L/6PF6PuRE5Uf6u2Ct9RsyWq8KyeTi15MZYSUvbMiLiq pX7/idKPNJ22nqyg8yCDOxXHrfKbqFQUX1w+0= Received: by 10.90.93.13 with SMTP id q13mr1578802agb.32.1232150442047; Fri, 16 Jan 2009 16:00:42 -0800 (PST) Received: by 10.90.27.7 with HTTP; Fri, 16 Jan 2009 16:00:41 -0800 (PST) Message-ID: <359a92830901161600h4e31e3d7j4e3362af8502c54a@mail.gmail.com> Date: Fri, 16 Jan 2009 19:00:41 -0500 From: "Erick Erickson" To: java-user@lucene.apache.org Subject: Re: Search Across All Fields In-Reply-To: <497111F8.7020409@stimulussoft.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_38_27732658.1232150442030" References: <49710068.1090808@gmail.com> <3994E409-BFF0-4348-9D84-4C762B150641@gmail.com> <497111F8.7020409@stimulussoft.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_38_27732658.1232150442030 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 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 > > ------=_Part_38_27732658.1232150442030--