From solr-user-return-148612-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Thu Jun 27 19:08:57 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 17092180607 for ; Thu, 27 Jun 2019 21:08:56 +0200 (CEST) Received: (qmail 96286 invoked by uid 500); 27 Jun 2019 19:08: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 96270 invoked by uid 99); 27 Jun 2019 19:08:48 -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; Thu, 27 Jun 2019 19:08:48 +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 7C8D8C0C1F for ; Thu, 27 Jun 2019 19:08:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.199 X-Spam-Level: X-Spam-Status: No, score=-0.199 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id krZARl0H845U for ; Thu, 27 Jun 2019 19:08:45 +0000 (UTC) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 2723561191 for ; Thu, 27 Jun 2019 19:08:45 +0000 (UTC) Received: by mail-pg1-f181.google.com with SMTP id m4so1451852pgk.0 for ; Thu, 27 Jun 2019 12:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=Xm4eBETo1XERf0R4s2H7UzgcfhFMCMgVoPO2H6vKDe8=; b=UbsD0T0VQ5FWgmocRoCtZUxW4/u/2VvXc5GIUu8cjCne8HEjbFONKEuJutZXN8Fi8D weS9xvtLZU0ODYV/rRHKvtexwYPjPScO4dI8N8ityyhGRJlSoLnw/cs2PIgxOSCpZrty NP+oykUR1d7+DizWRONohd8PTjD+350P7T1XFNcyCBEhslu74vpOAn0gwmj7+2bV5FhZ oycgT1mvab1Yf4YCYlDSjL3ZAa+m/pWCLh0d1c9epwX0h9OjkuH5vUbLSY1gnfbpoVfW GkKedx84bjx8NQZih0cGrCHGZv5/mVNtuSQqDF98utos6FRNCerUWC1IFq6Yf/DqLdx/ cPOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=Xm4eBETo1XERf0R4s2H7UzgcfhFMCMgVoPO2H6vKDe8=; b=eHLi+HdBft67QfmjsImhryuvsH4ady/Zw71RBW9PfTmNsaddb1nW6xP0yFuJt0ahwK 7BBvSW8DniJndVFZnjxD5PyTukPyDFIM5xweeYVYY3uhKGYTuumcpmUOPE6cRUtp0/0S kjkllIW7CSVA3oPZ4QabipxUwAMCkymlJYUoynwS5fDw7iAbI6ihZU2R/Pjx752Odr+J ebBsCjjUYVcNHd0rLF5w7NdNkg8gVohl2+A/yvPFSnzkkIbmZQ8ZD+KlWnGjB4cvbKJK 1P2xDjyvY9zkwHUF12K/Ptc3Wcka5GUYMAd34Ahq71UBKMrbUaFpK+8+ANfS3TFSW4J2 znwg== X-Gm-Message-State: APjAAAU/ro53hKirjtkd4/DcDMVZct+OM6i5AfxF7uasVEg4ivYiojoH flMrujM3QTTxtyRp6SdYg0Mg5pqTPDM= X-Google-Smtp-Source: APXvYqxzfNVv1vt3escnvLeN/jBav2MjgX3QWocId+TFYwKbFVxnMpvY3SweN2qLirvMeuQFa1NGGA== X-Received: by 2002:a63:ca07:: with SMTP id n7mr5209849pgi.165.1561662517866; Thu, 27 Jun 2019 12:08:37 -0700 (PDT) Received: from [192.168.1.122] (c-73-162-90-234.hsd1.ca.comcast.net. [73.162.90.234]) by smtp.gmail.com with ESMTPSA id i123sm4934543pfe.147.2019.06.27.12.08.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2019 12:08:37 -0700 (PDT) From: Erick Erickson Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [EXTERNAL] - Re: Solr not returning stored field Date: Thu, 27 Jun 2019 12:08:36 -0700 References: To: solr-user@lucene.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.104.11) Thanks for bringing closure, this was really puzzling. Don=E2=80=99t = want to mention how many times I=E2=80=99ve spent hours/days trying to = understand something only to finally figure out something similar ;). Best, Erick > On Jun 27, 2019, at 11:53 AM, Steve Pruitt = wrote: >=20 > Ok. When something makes no sense. Go back to the very beginning. I = was using an out of date configuration file which pointed SolrJ to = another running Solr that had a core similar enough to the one running = on localhost that I could not see an issue... until I checked = everything. >=20 > All is good. >=20 > -S >=20 > -----Original Message----- > From: Steve Pruitt =20 > Sent: Thursday, June 27, 2019 2:46 PM > To: solr-user@lucene.apache.org > Subject: RE: [EXTERNAL] - Re: Solr not returning stored field >=20 > Ok, I am totally confused. >=20 > It works fine using Solr Admin console on some test cases. I set the = fl box with ranking reference and I get back both fields. >=20 > For completeness, I clicked the url constructed for the query and it = works fine too. > Example: = http://localhost:8983/solr/suggestion/select?fl=3Dranking%20reference&q=3D= user:100000456 >=20 > Here is the confusing part. > I stepped through my code, as I looped through the returned documents = I copied the user value from the response and pasted user:value into the = Admin console and get no results. Yet, in my code using SolrQuery I see = a response for the same user:value with the ranking field. >=20 > This makes no sense to me. The Admin console is usually the source of = truth. Why would I get no response from the console, but see a response = using SolrJ? >=20 >=20 > -----Original Message----- > From: Alexandre Rafalovitch > Sent: Thursday, June 27, 2019 1:44 PM > To: solr-user > Subject: [EXTERNAL] - Re: Solr not returning stored field >=20 > (If no other SolrJ specific advice shows up).... >=20 > Can you divide the problem in a middle a see what happens and whether = the issue is Solr or SolrJ side. >=20 > Specifically, execute the query directly against Solr and see what = happens. >=20 > Also I would triple-check that the documents you are getting back = actually have the field. Sometimes not all documents do and the query = returns those wirhout first. Cross check by getting returned IDs and = looking up the full record directly in Solr. >=20 > Regards, > Alex >=20 > On Thu, Jun 27, 2019, 1:37 PM Steve Pruitt, = wrote: >=20 >> I cannot get Solr to return a stored field. >>=20 >> My schema is: >>=20 >> : >> = > name=3D"ranking" type=3D"pdouble" indexed=3D"false" stored=3D"true"/> = > name=3D"reference" type=3D"string" indexed=3D"false" stored=3D"true"/> >> : >>=20 >> I am using the SolrJ client and trying this: >>=20 >> The query string contains =3D " user: " and a list of user field = values;=20 >> The query executes ok. I get several documents. >>=20 >> SolrQuery solrQuery =3D new SolrQuery(query);=20 >> solrQuery.setSort("ranking" , SolrQuery.ORDER.desc);=20 >> solrQuery.addField("ranking"); solrQuery.addField("reference"); >>=20 >> I also tried: >>=20 >> solrQuery.setFields("ranking", " reference"); >>=20 >> But the result has only the "ranking" field. >> Before explicitly setting the fields. All fields came back in=20 >> response except "reference". >>=20