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 59598200B6B for ; Fri, 9 Sep 2016 19:35:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 57E8A160AA3; Fri, 9 Sep 2016 17:35:23 +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 A0FA8160AC2 for ; Fri, 9 Sep 2016 19:35:22 +0200 (CEST) Received: (qmail 60003 invoked by uid 500); 9 Sep 2016 17:35:21 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 59746 invoked by uid 99); 9 Sep 2016 17:35:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2016 17:35:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 994CB2C1B80 for ; Fri, 9 Sep 2016 17:35:20 +0000 (UTC) Date: Fri, 9 Sep 2016 17:35:20 +0000 (UTC) From: "Hoss Man (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (SOLR-9490) BoolField always returning false for non-DV fields? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 09 Sep 2016 17:35:23 -0000 [ https://issues.apache.org/jira/browse/SOLR-9490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hoss Man updated SOLR-9490: --------------------------- Attachment: SOLR-9490.patch {quote} I've spotted that the error with the json response happens when there is more than 1 shard in the collection. So toExternal() isn't being called when using a single shard and the json response writer, but it is used by the JavaBinCodec (via toObject() for BoolField) since javabin is used for communication between the shards? {quote} Gah .. yes, of course, that's totally plausable. It should have occured to me when you posted your original JSON example that you might have bene using SolrCloud. That would explain why you saw it with JSON, but Pavan only reported seeing it using javabin, and *not* with JSON. (I assumed that since your reports conflicted, there must have been some other independent variable you had in common -- but it was actaully a _difference_ you two had: cloud mode) Dan: thank you for the patch, I've refactored the key bit into our existing SolrExampleTests, so it's run as part of many tests (embedded, Jetty with XML, jetty with javabin, etc...) With the attached test patch, all of these tests fail... {noformat} [junit4] Tests with failures [seed: 4947C3B3180BA616]: [junit4] - org.apache.solr.client.solrj.embedded.SolrExampleStreamingBinaryTest.testExampleConfig [junit4] - org.apache.solr.client.solrj.embedded.SolrExampleJettyTest.testExampleConfig [junit4] - org.apache.solr.client.solrj.SolrExampleBinaryTest.testExampleConfig [junit4] - org.apache.solr.client.solrj.embedded.SolrExampleEmbeddedTest.testExampleConfig {noformat} ..working on fix, I suspect Colvin's earlier comments in SOLR-9187 are correct and it's a trivial fix. > BoolField always returning false for non-DV fields? > --------------------------------------------------- > > Key: SOLR-9490 > URL: https://issues.apache.org/jira/browse/SOLR-9490 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Affects Versions: 6.2 > Reporter: Hoss Man > Priority: Critical > Attachments: SOLR-9490.patch, Solr9490.java > > > 2 diff users posted comments in SOLR-9187 indicating that changes introduced in that issue have broken BoolFields that do *not* use DocValues... > [~cjcowie]... > {quote} > Hi, I've just picked up 6.2.0. It seems that the change to toExternal() in BoolField now means that booleans without DocValues return null, which then turns into Boolean.FALSE in toObject() regardless of whether the value is true or false. > e.g. with this schema, facet counts are correct, the returned values are wrong. > {code} > > > {code} > {code} > "response":{"numFound":2,"start":0,"maxScore":1.0,"docs":[ > { > "id":"124", > "f_EVE64":false, > "_version_":1544828487600177152}, > { > "id":"123", > "f_EVE64":false, > "_version_":1544828492458229760}] > }, > "facet_counts":{ > "facet_queries":{}, > "facet_fields":{ > "f_EVE64":[ > "false",1, > "true",1]}, > {code} > Could toExternal() perhaps fallback to how it originally behaved? e.g. > {code} > if (f.binaryValue() == null) { > return indexedToReadable(f.stringValue()); > } > {code} > {quote} > [~pavan_shetty]... > {quote} > I downloaded solr version 6.2.0 (6.2.0 764d0f19151dbff6f5fcd9fc4b2682cf934590c5 - mike - 2016-08-20 05:41:37) and installed my core. > In my schema.xml i have an field like following : > > Now i am accessing this field using SolrJ (6.1.0). But i am always getting false value for above field even though it contains true boolean value. This is happening for all boolean fields. > http://localhost:8983/solr...wt=javabin&version=2 HTTP/1.1 > It is working fine in other response writer. > If i change the solr version to 6.1.0, with same SolrJ, it starts working. So clearly this is a bug in version 6.2.0. > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org