From solr-user-return-77344-apmail-lucene-solr-user-archive=lucene.apache.org@lucene.apache.org Thu Jan 10 17:48:55 2013 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 C9810E9F2 for ; Thu, 10 Jan 2013 17:48:55 +0000 (UTC) Received: (qmail 80460 invoked by uid 500); 10 Jan 2013 17:48:51 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 80405 invoked by uid 500); 10 Jan 2013 17:48:51 -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 80393 invoked by uid 99); 10 Jan 2013 17:48:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jan 2013 17:48:51 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michaelj491@gmail.com designates 209.85.220.43 as permitted sender) Received: from [209.85.220.43] (HELO mail-pa0-f43.google.com) (209.85.220.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jan 2013 17:48:46 +0000 Received: by mail-pa0-f43.google.com with SMTP id fb10so493652pad.30 for ; Thu, 10 Jan 2013 09:48:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=qj585kooTY4QEpIRQKLdotxiYQunQy+tDcfyMXr7WrU=; b=wuoCrDoh39egbgP4qdT50kPunUtuoGf5WXa6xKSvzS2MPfSNoTPGpUKeqj2NeW9pBY JenBEZa14F/4zXhoPnqCs/0JN3B42Bz0TZQTH0Ngq1dHD93REky7vYwvHdSBs33B4nME cyK0RkxIlCCuVLK2z/6SlrxyDZ1QlhK/tVFUmgXHZUaPRO9RqZkyF217smzkYVmgZ+K0 YTmW5hq4MwtjxkNJJB7k8rf6rKHeE62fEKqL9LaSPL1s+VRD3iP4qkR+oqbF8RKsik5J 5s49uO27sf40YNvywk+xr5Iw+c3EvUkjz1ceUh7S1jF9RQGIIqYZAuOWa+8NJcoGFDvQ sXow== MIME-Version: 1.0 Received: by 10.68.251.233 with SMTP id zn9mr45167499pbc.7.1357840106217; Thu, 10 Jan 2013 09:48:26 -0800 (PST) Received: by 10.68.25.164 with HTTP; Thu, 10 Jan 2013 09:48:26 -0800 (PST) In-Reply-To: References: Date: Thu, 10 Jan 2013 17:48:26 +0000 Message-ID: Subject: Re: OR query From: Michael Jones To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7b2e06c931612a04d2f2c92b X-Virus-Checked: Checked by ClamAV on apache.org --047d7b2e06c931612a04d2f2c92b Content-Type: text/plain; charset=ISO-8859-1 I've tried both ways and I still get zero results with this. Even though name_long:"paisley, ian" will return results. name_long:"paisley, ian" (constituencies:(ian paisley) OR label:(ian paisley) OR office:(ian paisley)) On Thu, Jan 10, 2013 at 3:27 PM, Jack Krupansky wrote: > You're using query and filter query backwards - the query is what you are > looking for (the OR), while the filter query is the constraint on the query > - the drill down. > > > -- Jack Krupansky > > -----Original Message----- From: Michael Jones > Sent: Thursday, January 10, 2013 7:38 AM > To: solr-user@lucene.apache.org > Subject: Re: OR query > > > Thanks, I've tried doing > > > xml > > (constituencies:(ian paisley) OR label:(ian paisley) OR office:(ian > paisley)) > > name_long:"paisley, ian" > > > > > and > > +ian +paisley "paisley, ian" > name_long:"paisley, ian" > > But neither return any results > > > On Thu, Jan 10, 2013 at 11:53 AM, Jack Krupansky > **wrote: > > Use filter queries to filter or drill down: >> >> http://wiki.apache.org/solr/****CommonQueryParameters#fq >> >> > >> >> >> Also consider using dismax/edismax queries, which are designed to match on >> any of multiple fields. >> >> Also be careful to put a space between each left parenthesis and field >> name since there is a known bug that causes such queries to fail. >> >> -- Jack Krupansky >> >> -----Original Message----- From: Michael Jones >> Sent: Thursday, January 10, 2013 6:24 AM >> To: solr-user@lucene.apache.org >> Subject: OR query >> >> >> Hi, >> >> I have a query that searches through every field to find the text 'london' >> >> (constituencies:(london) OR label:(london) OR name:(london) OR >> office:(london)) >> >> Which works fine, but when I want to filter my results. Say I want to >> filter down to constituencies that exactly match 'london', but also search >> the rest of the fields to make sure that the keyword still matches >> elsewhere >> >> (label:(london) OR name:(london) OR office:(london)) AND >> (constituencies:"london") >> >> Sometimes I get zero results because label, name and office don't have the >> keyword 'london', but I know constituencies does, so results should be > >> 0. >> But if try: >> >> (constituencies:(london) OR name:(london) OR office:(london)) AND >> (label:"london") >> >> returns results because constituencies is in one of the OR queries. >> >> Is there a way to say if none of the OR quires bring back a result at >> least >> search the AND? >> >> Thanks >> >> > --047d7b2e06c931612a04d2f2c92b--