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 3709E200B7F for ; Sun, 11 Sep 2016 18:37:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 357F7160AC7; Sun, 11 Sep 2016 16:37:58 +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 56555160AB6 for ; Sun, 11 Sep 2016 18:37:57 +0200 (CEST) Received: (qmail 37835 invoked by uid 500); 11 Sep 2016 16:37:55 -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 37823 invoked by uid 99); 11 Sep 2016 16:37:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Sep 2016 16:37:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BA3DB180502 for ; Sun, 11 Sep 2016 16:37:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.802 X-Spam-Level: X-Spam-Status: No, score=-0.802 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id rKfvHPy0R73v for ; Sun, 11 Sep 2016 16:37:52 +0000 (UTC) Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 5FDAD5FACE for ; Sun, 11 Sep 2016 16:37:52 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id m11so258867654oif.1 for ; Sun, 11 Sep 2016 09:37:52 -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; bh=YxaASedtFn7ndOhZ39t0WsyP2vtOzmF+eil3aJztjDg=; b=kzlPkcMo20XnERFEWYTCkazZDhzZZ1K1Ktc5Wkld+S/O09Hanfl9WIF5p/7p7FjTzJ P5b49px2no7Z+W1Rl1RTT/r9I9oHk7MgLx9B+N4Wi168/RWc8s2KVN80TysS9f36PVpS DEtKMQxXBLfwuQmm7IAokGai1W3lluKYRWXKcXJL7na2RXTvdYi8BCZrIy1vIPxOD2Qc /2XofHkEqPghj2Bhft0U8tE97c0wkH2J6rsndoGOv6vbMqur9HWbs8fGkaKNxwwt1ION oCxZfqN1kdMyjUcDgxd3jRQzYtSGOEFgNLT7RG3u0WJSxjx0eyPNpS44XyTNhElrjEen HXCQ== 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; bh=YxaASedtFn7ndOhZ39t0WsyP2vtOzmF+eil3aJztjDg=; b=Nh8RAxhCQ+WkidgwMx+xq6l3+IUiS1mEXAR1P6md3Jkeiif9LE3UIzQezb9DjGo9JJ +J8k7jNtDQcivHSecd9BZFSmhrN0J1/3PPbIFq3Rp8x2IuJ4TkDYyH7J52oWQAaVD95t 9wijQKnTjthQpEv2/Q+69BclH1glBl5qZ8V/MEH3GyWrEY05tfQH8Sr7ji7GZUtzb2UH miTJcVx4EaVe2f+kJsWPEGWL/6GvpyqqZbmyq/NWb0WNzi2bZtVL1rP38DJq/54r5R87 cITAQ3zzATwVtOjz9S8ELddOfNIYgDEPFVMOXb3CmBW00RRbpz+xyMYyDSlbTf/Xgbxd kaKw== X-Gm-Message-State: AE9vXwN9a5ptlzLYnnIPGe3BL1aN2Cj2p1W0XjpGUIjvTcIm7dRyUK20jok11uAPvKb+QS3ut/SiB8PVLEcORQ== X-Received: by 10.157.53.102 with SMTP id l35mr3140572ote.181.1473611865810; Sun, 11 Sep 2016 09:37:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.114.234 with HTTP; Sun, 11 Sep 2016 09:37:05 -0700 (PDT) In-Reply-To: References: <007b01d20b11$e77aa5d0$b66ff170$@merajob.in> <122f6c1f-07ad-0db1-0d17-8a6e907e15fc@elyograg.org> From: Alexandre Rafalovitch Date: Sun, 11 Sep 2016 23:37:05 +0700 Message-ID: Subject: Re: query formulation To: solr-user Content-Type: text/plain; charset=UTF-8 archived-at: Sun, 11 Sep 2016 16:37:58 -0000 1. There are tutorials. Actually a number of them. But none of them - as far as I remember - go very far into the query language. They kind of stop of basic queries. I remember the first time I realized I can get multiple subqueries working together (for https://gist.github.com/arafalov/5e04884e5aefaf46678c I think). There is also _a lot_ of resources on the web, but they are not easily discoverable. I am looking into doing something about that, but it is not public (or even alpha) yet. 2. Solr Reference Guide (not wiki) is the starting point now. It is quite comprehensive, but it is a reference guide, not a tutorial. So, some information is still in unexpected sections (e.g. parent/child queries, child expansion, etc). 3. Yes and yes. I am not promising knowing all answers, but I've been already digging into some of this for various solr-start projects and for my upcoming presentation. Contact me off the list and let's talk. Regards, Alex. ---- Newsletter and resources for Solr beginners and intermediates: http://www.solr-start.com/ On 11 September 2016 at 23:24, John Bickerstaff wrote: > All, > > I've found that figuring out the subtle nuances of the query language is a > *daunting* task for someone unfamiliar with SOLR. > > I'm not aware of any comprehensive documentation (in the form of a tutorial > or similar really useful tool) > > It seems the information is scattered all over the place an has to be dug > out piecemeal... Typical for open-source projects. Yes, I've seen the > wiki - and it's not too far from a man page. Everything that is possible > (in theory) is contained in the api, but that is not the same thing as a > large set of examples that *show* how to use it. > > So, three questions: > > 1. Is there somewhere that really dives into the use of the query language > (like a tutorial)? > 2. Assuming not, is there a web page that at least contains a majority of > the links to various sources to assist someone in studying? > 3. Is there any interest in having someone do this documentation / tutorial > creation? > 3a. If the answer to 3 is yes - are the committers/solr experts > willing to volunteer to answer questions via email if I build the tutorial? > > If the answer to 3 is yes and yes - I cut my teeth in the industry 20 years > ago as a Tech Writer and Instructional Designer. I will build and publish > the tutorial - but I don't have the time to dig out all the info the hard > way - which is why I asked 3a... > > On Sat, Sep 10, 2016 at 11:20 AM, Erick Erickson > wrote: > >> Background for Shawn's comments can be found here: >> >> https://lucidworks.com/blog/2011/12/28/why-not-and-or-and-not/ >> >> Solr's query language is NOT strict boolean logic as explained >> above. Although with proper grouping (parenthesizing) and tricks >> like Shawn mentioned it can be pretty close. >> >> Best, >> Erick >> >> On Fri, Sep 9, 2016 at 9:17 PM, Shawn Heisey wrote: >> > On 9/9/2016 9:17 PM, Prasanna S. Dhakephalkar wrote: >> >> Further search on net got me answer >> >> >> >> The query to be >> >> >> >> a_id:20 OR (*:* NOT a_id:*) >> >> >> >> I don't understand this syntax >> > >> > The basic problem here is that negative queries don't work. If you're >> > going to subtract X, you have to start with something (like all docs), >> > or the result is nothing. >> > >> > For simple queries (just a single "-field:X" clause), Solr is able to >> > detect the unworkable situation and implicitly add a "*:*" starting >> > point, so the query works. >> > >> > When the query has ANY complexity, Solr's negative query detection isn't >> > possible, and the query can't be fixed automatically, so it doesn't work. >> > >> > Thanks, >> > Shawn >> > >>