Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A27E9714 for ; Fri, 24 May 2013 00:31:48 +0000 (UTC) Received: (qmail 92775 invoked by uid 500); 24 May 2013 00:31:45 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 92697 invoked by uid 500); 24 May 2013 00:31:45 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 92688 invoked by uid 99); 24 May 2013 00:31:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 May 2013 00:31:44 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.111.4.26] (HELO out2-smtp.messagingengine.com) (66.111.4.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 May 2013 00:31:39 +0000 Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 14F0E2090F for ; Thu, 23 May 2013 20:31:13 -0400 (EDT) Received: from web6.nyi.mail.srv.osa ([10.202.2.216]) by compute3.internal (MEProxy); Thu, 23 May 2013 20:31:13 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=H4F7UlbQJTtBXyU2d3rD8kZo5T8=; b=Wpj rPvmLKdgcozkqBByiyZ3Ojug6Mo9x3X7QtyD62nwWpiLAGUcuTbV9aKg2Tm65Cv7 QskRfnd1JKplGi6uiuEPMk5QHBdYEf+i3X/Ma7CrY3zVuAzalPEVwDnK7vk2dE6f PDvIBveSRX3YES5akGb8mmX+c4lkzDVCmytXkln8= Received: by web6.nyi.mail.srv.osa (Postfix, from userid 99) id E61EE400BB; Thu, 23 May 2013 20:31:12 -0400 (EDT) Message-Id: <1369355472.10946.140661234989305.1CD07B5A@webmail.messagingengine.com> X-Sasl-Enc: 66it1JlbI8+Wu9eR1XVaj9Z7KRI2Mb1CHm8EmHICE3qe 1369355472 From: Upayavira To: solr-user@lucene.apache.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-7df4f069 In-Reply-To: References: Subject: Re: Can anyone explain this Solr query behavior? Date: Fri, 24 May 2013 01:31:12 +0100 X-Virus-Checked: Checked by ClamAV on apache.org (+(doc-id:3000 DisjunctionMaxQuery((Publisher:and^2.0 | text:and | Classification:and^2.0 | Contributors:and^2.0 | Title:and^3.0))))/no_coord You're using edismax, not lucene. So AND is being considered as a search term, not an operator, and the word 'and' probably exists in 631580 documents. Why is it triggering dismax? Probably because field:() is not valid syntax, so edismax is dropping to dismax because it isn't a valid lucene query. What do you expect text:() to do? If you want to match any docs that have a value in the text field, use q=text:[* TO *] To match docs that *don't* have a value in the text field: q=-text[* TO *] Upayavira On Fri, May 24, 2013, at 12:23 AM, Shankar Sundararaju wrote: > Hi Erick, > > Here's the output after turning on the debug flag: > > *q=text:()&debug=query* > > yields > > > > 0 > 17 > > true > text:() > query > > > > > text:() > text:() > (+())/no_coord > +() > ExtendedDismaxQParser > > > > > > > > *q=doc-id:3000&debug=query* > > yields > > > > 0 > 17 > > doc-id:3000 > query > > > > > : > : > > > > doc-id:3000 > doc-id:3000 > (+doc-id:3000)/no_coord > +doc-id:`#8;#0;#0;#23;8 > ExtendedDismaxQParser > > > > > > > > *q=doc-id:3000 AND text:()&debug=query* > > yields > > > > 0 > 23 > > doc-id:3000 AND text:() > query > > > > > : > > : > > > : > > > : > > > : > > > : > > > > doc-id:3000 AND text:() > doc-id:3000 AND text:() > > (+(doc-id:3000 DisjunctionMaxQuery((Publisher:and^2.0 | text:and | > Classification:and^2.0 | Contributors:and^2.0 | > Title:and^3.0))))/no_coord > > > +(doc-id:`#8;#0;#0;#23;8 (Publisher:and^2.0 | text:and | > Classification:and^2.0 | Contributors:and^2.0 | Title:and^3.0)) > > ExtendedDismaxQParser > > > > > > > > *solrconfig.xml:* > > > explicit > 10 > text > edismax > text^1.0 Title^3.0 Classification^2.0 > Contributors^2.0 Publisher^2.0 > > > *schema.xml:* > "false"/>* > * > multiValued="false"/> > class="MyAnalyzer"/> > type="multiterm" class="MyAnalyzer"/> > * > * > *Note:* MyAnalyzer among few other customizations, uses > WhitespaceTokenizer > and LoweCaseFilter > > Thanks a lot. > > -Shankar > > > On Thu, May 23, 2013 at 4:34 AM, Erick Erickson > wrote: > > > Please post the results of adding &debug=query to the URL. > > That'll tell us what the query parser spits out which is much > > easier to analyze. > > > > Best > > Erick > > > > On Wed, May 22, 2013 at 12:16 PM, Shankar Sundararaju > > wrote: > > > This query returns 0 documents: *q=(+Title:() +Classification:() > > > +Contributors:() +text:())* > > > > > > This returns 1 document: *q=doc-id:3000* > > > > > > And this returns 631580 documents when I was expecting 0: *q=doc-id:3000 > > > AND (+Title:() +Classification:() +Contributors:() +text:())* > > > > > > Am I missing something here? Can someone please explain? I am using Solr > > > 4.2.1 > > > > > > Thanks > > > -Shankar > > > > > > -- > Regards, > *Shankar Sundararaju > *Sr. Software Architect > ebrary, a ProQuest company > 410 Cambridge Avenue, Palo Alto, CA 94306 USA > Shankar@ebrary.com | www.ebrary.com | 650-475-8776 (w) | 408-426-3057 (c)