Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6541A2009F9 for ; Mon, 23 May 2016 19:33:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 63B77160A0E; Mon, 23 May 2016 17:33:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ACA87160A05 for ; Mon, 23 May 2016 19:33:39 +0200 (CEST) Received: (qmail 50757 invoked by uid 500); 23 May 2016 17:33:38 -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 50745 invoked by uid 99); 23 May 2016 17:33:37 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 May 2016 17:33:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 71BAAC05FF for ; Mon, 23 May 2016 17:33:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id S2PVED20wdY7 for ; Mon, 23 May 2016 17:33:33 +0000 (UTC) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 8A5F35F343 for ; Mon, 23 May 2016 17:33:33 +0000 (UTC) Received: by mail-it0-f42.google.com with SMTP id l63so33228086ita.1 for ; Mon, 23 May 2016 10:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=N6tbz28Y54YkMS2OAIF1yEntN0DSqJeR4HC8krGrRFY=; b=YQRXg6r8DiqEOaKsIz5XXguUDscfJ4Ytqbuxffo8EWU9ugiGMmgzWDN1UmQ12dr53i pKMRIpDktrWxrvCtVzwmzhtlIfUvARVL8KJxTQSZ7ZRMChr5IR9xMXGE2Lfq+rNjC9vY yohK6j56EYYylzSInfAd9+pFK0msZhpl0zj+9F/mYq6tr29Xq+MAK/ricfiwtmJcz+YY PWcBY/JeOuZmHKUyCXc8h1GnU4PHBejvzeuD33AN+SlMU4tJdD80yMUZY7b8xgAMqFWr luv/7TJFYuynnX1q9xNOXEzc0k6BhKGmhkwlyUNLiROv4eKQjBRARzlLrteInTkFqTBS 5mdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=N6tbz28Y54YkMS2OAIF1yEntN0DSqJeR4HC8krGrRFY=; b=bN1EFo4tSJVCm4Uva7fq/43rN8vppL7i8p1/oKO/KPpOlXsTH+Lrpcfeydskyuzd6J mdbzSSMc8PSpKXVwrfZQZTFsF8yT5bbkvdNHFWW06HHU7NUN832PPR9KreftTWUXwXjR NrCeaq0iPVKzTq8Hh0lrcOiccY02XylXZLzBScR8ukcabtqceiYxKy2oRSvPdyokkuXK uDfpx66VrStSXKnbUqKE3THohVKt5hCT2D+8h4wsBCJ7NppIqRxePzQhjqAZ5tAlwizd OPmKSvggnpfcmYs59+kz/tKwOJHoq+vB3piIzd36g4EVcs15+F55j0f+ahM0Y1/T2AZu 8ruQ== X-Gm-Message-State: AOPr4FVmK8B30y8pilvTeKCQtG2X98W3HtPdwEwznq0ATBvP2dlJw8TTJu2pWH8Oy7Tm5r2GNsaY1DTO8gdvdA== X-Received: by 10.36.71.8 with SMTP id t8mr14550667itb.47.1464024812720; Mon, 23 May 2016 10:33:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.10.208 with HTTP; Mon, 23 May 2016 10:33:13 -0700 (PDT) In-Reply-To: References: <74B24A76-C633-42D8-9AD2-D5CC2B31AFCB@gmail.com> From: Erick Erickson Date: Mon, 23 May 2016 10:33:13 -0700 Message-ID: Subject: Re: How to use "fq" To: solr-user Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Mon, 23 May 2016 17:33:40 -0000 Steven: I'm not sure you can, the terms query parser is built to OR things together. You might be able to use some of the nested query stuff. Or, assuming you have an _additional_ fq clause you want to use just use it as: fq=3D{!terms f=3Dcategory}1,2,3,4,...N&fq=3Dwhaterver Then you're taking advantage of the default behavior of multiple "fq" clauses. And I'd do one other thing, I'd add "cache=3Dfalse" (at least I'm pretty sure this works): fq=3D{!terms f=3Dcategory cache=3Dfalse}1,2,3,4,...N on the assumption that it's highly unlikely that you'll send in another fq clause _exactly_ like the one you're creating. Best, Erick On Mon, May 23, 2016 at 9:41 AM, Steven White wrote: > Thank you Erik and Scott. {!terms} did the job!! I tested like so: > fq=3D{!terms f=3Dcategory}1,2,3,4,...N > > I read that {!terms} treats the terms in the list as OR, if I have a need > to force AND on my terms, how do I do that? > > Steve > > > On Mon, May 23, 2016 at 9:39 AM, Scott Chu wrote= : > >> >> Yonik has a very well article about term qp: >> >> Solr Terms Query for matching many terms - Solr 'n Stuff >> http://yonik.com/solr-terms-query/ >> >> >> Scott Chu=EF=BC=8Cscott.chu@udngroup.com >> 2016/5/23 (=E9=80=B1=E4=B8=80) >> ----- Original Message ----- >> From: Erik Hatcher >> To: solr-user >> CC: >> Date: 2016/5/23 (=E9=80=B1=E4=B8=80) 21:14 >> Subject: Re: How to use "fq" >> >> >> Try the {!terms} query parser. That should make it work well for you. Le= t >> us know how it does. >> >> Erik >> >> > On May 23, 2016, at 08:52, Steven White wrote: >> > >> > Hi everyone, >> > >> > I'm trying to figure out what's the best way for me to use "fq" when t= he >> >> > list of items is large (up to 200, but I have few cases with up to 100= 0). >> > >> > My current usage is like so: &fq=3Dcategory:(1 OR 2 OR 3 OR 4 ... 200) >> > >> > When I tested with up to 1000, I hit the "too many boolean clauses", s= o >> my >> > fix was to increase the value of maxBooleanClauses. However, reading [= 1] >> > warns that increasing the value of maxBooleanClauses has negative impa= ct. >> > The link offers an alternative usage like so: >> > fq=3Dcategory:1&fq=3Dcategory:2... But I cannot use it because I need = my "fq" >> > to be treated as OR (my default is set to AND). >> > >> > I'm trying to understand what's the best way for me to coded this so I >> > don't get a performance or memory hit. >> > >> > Thanks >> > >> > Steve >> > >> > [1] >> > >> http://solr.pl/en/2011/12/19/do-i-have-to-look-for-maxbooleanclauses-whe= n-using-filters/ >> >> >> ----- >> ??????????? >> ??? AVG ?? - www.avg.com >> ??: 2015.0.6201 / ???: 4568/12281 - ????: 05/23/16 >>