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 20A4D106E3 for ; Wed, 30 Apr 2014 22:40:16 +0000 (UTC) Received: (qmail 82665 invoked by uid 500); 30 Apr 2014 22:40:10 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 82552 invoked by uid 500); 30 Apr 2014 22:40:09 -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 82544 invoked by uid 99); 30 Apr 2014 22:40:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2014 22:40:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of solr@elyograg.org designates 166.70.79.219 as permitted sender) Received: from [166.70.79.219] (HELO frodo.elyograg.org) (166.70.79.219) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Apr 2014 22:40:04 +0000 Received: from localhost (localhost [127.0.0.1]) by frodo.elyograg.org (Postfix) with ESMTP id 97751442E for ; Wed, 30 Apr 2014 16:39:40 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=elyograg.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :references:subject:subject:mime-version:user-agent:from:from :date:date:message-id:received:received; s=mail; t=1398897580; bh=v8GPJe84NVxGY75ufRvF/Et2yEkzeFz+9RosbrWUqY4=; b=NXcWrmHCtaoj hkS1+wJr3qcJIvjc/puyickjjMyLjiAWUKZ1Fh6Ebmo3/JuG8eztt4gRh2NKOS9Q sVmpwxgsLWfYGYiC9LEPYvyeBBW+HO8UViPEB304AL9dxROFyAeQRhZgNh3/GqUT qkz7mO5kcJY1x5NWPke039XYftlnmO4= X-Virus-Scanned: Debian amavisd-new at frodo.elyograg.org Received: from frodo.elyograg.org ([127.0.0.1]) by localhost (frodo.elyograg.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lhDes40bTgBL for ; Wed, 30 Apr 2014 16:39:40 -0600 (MDT) Received: from [10.2.0.182] (client175.mainstreamdata.com [209.63.42.175]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: elyograg@elyograg.org) by frodo.elyograg.org (Postfix) with ESMTPSA id 23CAE2C68 for ; Wed, 30 Apr 2014 16:39:40 -0600 (MDT) Message-ID: <53617BAA.2090008@elyograg.org> Date: Wed, 30 Apr 2014 16:39:38 -0600 From: Shawn Heisey User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: solr-user@lucene.apache.org Subject: Re: Which Lucene search syntax is faster References: <8D132C9F4FCA85B-DBC-3F8B@webmail-vd002.sysops.aol.com> <536168B2.3090102@elyograg.org> <8D132D4E59A9A96-DBC-46DA@webmail-vd002.sysops.aol.com> In-Reply-To: <8D132D4E59A9A96-DBC-46DA@webmail-vd002.sysops.aol.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 4/30/2014 3:47 PM, johnmunir@aol.com wrote: > Thank you Shawn and Erick for the quick response. > > > A follow up question. > > > Basedon https://cwiki.apache.org/confluence/display/solr/Common+Query+Parameters#CommonQueryParameters-Thefq%28FilterQuery%29Parameter,I see the "fl" (field list) parameter. Does this mean I canbuild my Lucene search syntax as follows: The fl parameter determines which stored fields show up in the results. By default, all fields that are stored will be returned. If you want relevancy scores, you'd include the pseudofield named "score" -- &fl=*,score is something we see a lot. The fl parameter does not affect the *search* at all. > q=skyfall OR ian ORfleming&fl=title&fl=owner&fq=doc_type:DOC > > > And get the same result as (per Shawn's example changed it bit toadd OR): > > > q=title:(skyfall OR ian OR fleming)owner:(skyfall OR ian OR fleming)&fq=doc_type:DOC Exactly right. > Btw, my default search operator is set to AND. My need is tofind whatever the user types in both of those two fields (or maybe some otherfields which is controlled by the UI).. For example, user types"skyfall ian fleming" and selected 3 fields, and want to narrowdown to doc_type DOC. With the standard parser, you'd have to do the following. Assume that USERQUERY is a very basic query, perhaps a few terms, like your example of "skyfall ian fleming". q=field1:(USERQUERY) OR field2:(USERQUERY) OR field3:(USERQUERY)&fq=doc_type:DOC With edismax, you'd do: q=USERQUERY&qf=field1 field2 field3&fq=doc_type:DOC You might also add "&pf=field1 field2 field3" ... and there are a great many other edismax/dismax query parameters too. The edismax parser does some truly amazing stuff. Echoing what both Erick and I said ... worrying about the exact syntax is premature optimization. 10 million docs is something that Solr can handle easily, as long as there's enough RAM. Thanks, Shawn