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 494C8200B45 for ; Fri, 15 Jul 2016 18:43:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 47E1F160A61; Fri, 15 Jul 2016 16:43:07 +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 8F351160A57 for ; Fri, 15 Jul 2016 18:43:06 +0200 (CEST) Received: (qmail 21415 invoked by uid 500); 15 Jul 2016 16:43:04 -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 21403 invoked by uid 99); 15 Jul 2016 16:43:04 -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; Fri, 15 Jul 2016 16:43:04 +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 DCCEF186E2C for ; Fri, 15 Jul 2016 16:43:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.821 X-Spam-Level: X-Spam-Status: No, score=-0.821 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 mx2-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 eaHOBnOqRYsS for ; Fri, 15 Jul 2016 16:42:59 +0000 (UTC) Received: from mail-it0-f49.google.com (mail-it0-f49.google.com [209.85.214.49]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 2CBB55F642 for ; Fri, 15 Jul 2016 16:42:49 +0000 (UTC) Received: by mail-it0-f49.google.com with SMTP id f6so23759722ith.0 for ; Fri, 15 Jul 2016 09:42:49 -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=/UlOtx4fonbTZuYewEokNLNWQPHkTlt5e89BHcoKgOc=; b=BylO0al/6qfTIVP+GK60sysHA8Pe4+An+jRl0G+7QBlfD3fJ8uFK0f8ybNblp9Q86/ rJ70SG72wV/2kyN95S67zkZQl+n/DSzsjWjedD8c8fcQsoTPyddiHXxWTmNXbTSXm6eJ LDvA+YogpeywwMY7/7Du9dJrRGlFZLon7GGfy8yuNScqSm8xIl9ZmIQbaEnleNyvpgcb hy/ARI9U27Gvw6CydPBeVniymg68x5fySXaEkWKKT/DMY9sQU0wGEE+fe6ZBsEMD+qkU Nvnn0VeL/2iVG7HMBIgQ/RSTPweA5GKw5zqv0cSUk7UtLki+M4YOBbBuOtR+J9BN8lzZ 62aA== 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=/UlOtx4fonbTZuYewEokNLNWQPHkTlt5e89BHcoKgOc=; b=IL+h6mFdizf7wqXDp8mcB1Zk5ktARB3PuUEoHARukgF9/Z1Ve4O7tpiluNq/PIU+PU KRGUux0Jc9oH+kQgMvPDHbrhWuXrUQLTx4hVkM84kBe61qhPEn8iJkoBL+t6uStPlJMM +N8Nc0WIuZMr+iFbeXSdWurUYJhX8bSSN27dRnHKW+fCGCn5Xd2Z/YXUSpd9tg8PPyQ9 Inqz4h7DaR8UCOqzqnNyez+vjDLGd5nkBZlsMLeX51jFCfwNlWLojX6an6Ue/DeyeFFj YzMYL9uku+jwQjy/LH3z5p+r3JoAcr4BkFfCVKOTEyZXHct6Ux3LtH+3WNv9Q2jry6SY 4V+g== X-Gm-Message-State: ALyK8tKe0dYZMZC+G0cALak6xn2Ot4immIq9wLmmVUii5F6q9tpe8JEKUvKplbJ8mZRzXu2DWcbFYkOt3mU/zQ== X-Received: by 10.36.98.8 with SMTP id d8mr22115248itc.39.1468600962355; Fri, 15 Jul 2016 09:42:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.150.5 with HTTP; Fri, 15 Jul 2016 09:42:02 -0700 (PDT) In-Reply-To: References: <5788F05E.6000109@step-net.it> From: Erick Erickson Date: Fri, 15 Jul 2016 09:42:02 -0700 Message-ID: Subject: Re: search documents that have a specific field populated To: solr-user Content-Type: text/plain; charset=UTF-8 archived-at: Fri, 15 Jul 2016 16:43:07 -0000 First of all I get an error message on startup with a field definition like: default=EMPTY. So I'm assuming you are puttint in quotes default="EMPTY" The query q=field:[* TO *] should be fine, as is John's query fq:field:[* TO *] So something's wonky here. I'd start by deleting the entire index on the theory that you're in a state you don't remember (i.e. perhaps during some of your experiments you now have docs with "EMPTY" in the field, some blank and whatever else). Second, don't provide any default for the field. At that point q=field:[* TO *] should work. If it doesn't, please post again with 1> a sample doc 2> the field definition exactly as in your schema file (please copy/paste). 3> the results of adding &debug=query to the URL. Best, Erick On Fri, Jul 15, 2016 at 8:16 AM, John Blythe wrote: > we use something in between: fq=fieldName[* TO *] > > -- > *John Blythe* > Product Manager & Lead Developer > > 251.605.3071 | john@curvolabs.com > www.curvolabs.com > > 58 Adams Ave > Evansville, IN 47713 > > On Fri, Jul 15, 2016 at 10:17 AM, Valentina Cavazza > wrote: > >> Hi, >> I need to search documents that have a specific field populated, so I want >> to display all the documents that have the field not empty. >> This field in schema is set multivalued=true, indexed=true, stored=true, >> default=EMPTY. >> This field type is solr.TextField class, use StandardTokenizerFactory >> tokenizer, ICUFoldingFilterFactory filter, LowerCaseFilterFactory filter >> and GreekStemFilterFactory filter in index and query analizer. >> I already tried queries like this: >> q=field:* >> q=+field:* >> q=+field:[* TO *] >> q=+field:['' TO *] >> q=+field:["" TO *] >> q=+field:[' ' TO *] >> q=+field:' ' >> q=-field:EMPTY >> >> but nothing found. >> Someone know how to do that? >> Thanks >> >> Valentina >>