You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Trygve Laugstøl (JIRA)" <ji...@apache.org> on 2011/08/17 16:23:27 UTC
[jira] [Created] (SOLR-2714) JsonLoader does not handle null fields
JsonLoader does not handle null fields
--------------------------------------
Key: SOLR-2714
URL: https://issues.apache.org/jira/browse/SOLR-2714
Project: Solr
Issue Type: Bug
Affects Versions: 3.3
Reporter: Trygve Laugstøl
The parser in JsonLoader does not handle null fields when adding a document over http+json.
Given this document:
{code}
[{
"timestamp":"2011-08-17T14:11:49.201Z",
"correlationId":"N44YFGSQNC",
"logType":"event",
"short":"Invalidating session: 4zy6cvdtmvu1erlay0sn6rhz",
"long":null
}]
{code}
I'm getting a response code=400 and the error message "should finish doc first" in the logs.
It seems that JsonLoader is missing case for JSONParser.NULL in the parser even switch.
* https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/JsonLoader.java
* https://svn.apache.org/repos/asf/labs/noggit/src/main/java/org/apache/noggit/JSONParser.java
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (SOLR-2714) JsonLoader does not handle null field
values
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley resolved SOLR-2714.
--------------------------------
Resolution: Fixed
Fix Version/s: 3.4
> JsonLoader does not handle null field values
> --------------------------------------------
>
> Key: SOLR-2714
> URL: https://issues.apache.org/jira/browse/SOLR-2714
> Project: Solr
> Issue Type: Improvement
> Affects Versions: 3.3
> Reporter: Trygve Laugstøl
> Priority: Minor
> Fix For: 3.4
>
> Attachments: SOLR-2714.patch
>
>
> The parser in JsonLoader does not handle null fields when adding a document over http+json.
> Given this document:
> {code}
> [{
> "timestamp":"2011-08-17T14:11:49.201Z",
> "correlationId":"N44YFGSQNC",
> "logType":"event",
> "short":"Invalidating session: 4zy6cvdtmvu1erlay0sn6rhz",
> "long":null
> }]
> {code}
> I'm getting a response code=400 and the error message "should finish doc first" in the logs.
> It seems that JsonLoader is missing case for JSONParser.NULL in the parser even switch.
> * https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/JsonLoader.java
> * https://svn.apache.org/repos/asf/labs/noggit/src/main/java/org/apache/noggit/JSONParser.java
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2714) JsonLoader does not handle null
fields
Posted by "Neil Hooey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093139#comment-13093139 ]
Neil Hooey commented on SOLR-2714:
----------------------------------
If you had some sort of IntOrNull value, that had a default value of 0, and you indexed it as null with /update/json, dropping the null would make the value 0 instead.
Is there any data type in Solr that can be a value, or null? If not, then dropping the nulls is fine.
> JsonLoader does not handle null fields
> --------------------------------------
>
> Key: SOLR-2714
> URL: https://issues.apache.org/jira/browse/SOLR-2714
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: Trygve Laugstøl
>
> The parser in JsonLoader does not handle null fields when adding a document over http+json.
> Given this document:
> {code}
> [{
> "timestamp":"2011-08-17T14:11:49.201Z",
> "correlationId":"N44YFGSQNC",
> "logType":"event",
> "short":"Invalidating session: 4zy6cvdtmvu1erlay0sn6rhz",
> "long":null
> }]
> {code}
> I'm getting a response code=400 and the error message "should finish doc first" in the logs.
> It seems that JsonLoader is missing case for JSONParser.NULL in the parser even switch.
> * https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/JsonLoader.java
> * https://svn.apache.org/repos/asf/labs/noggit/src/main/java/org/apache/noggit/JSONParser.java
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2714) JsonLoader does not handle null
fields
Posted by "Trygve Laugstøl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086888#comment-13086888 ]
Trygve Laugstøl commented on SOLR-2714:
---------------------------------------
Just dropping them sounds good.
> JsonLoader does not handle null fields
> --------------------------------------
>
> Key: SOLR-2714
> URL: https://issues.apache.org/jira/browse/SOLR-2714
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: Trygve Laugstøl
>
> The parser in JsonLoader does not handle null fields when adding a document over http+json.
> Given this document:
> {code}
> [{
> "timestamp":"2011-08-17T14:11:49.201Z",
> "correlationId":"N44YFGSQNC",
> "logType":"event",
> "short":"Invalidating session: 4zy6cvdtmvu1erlay0sn6rhz",
> "long":null
> }]
> {code}
> I'm getting a response code=400 and the error message "should finish doc first" in the logs.
> It seems that JsonLoader is missing case for JSONParser.NULL in the parser even switch.
> * https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/JsonLoader.java
> * https://svn.apache.org/repos/asf/labs/noggit/src/main/java/org/apache/noggit/JSONParser.java
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-2714) JsonLoader does not handle null fields
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley updated SOLR-2714:
-------------------------------
Attachment: SOLR-2714.patch
Here's a patch that drops null values.
> JsonLoader does not handle null fields
> --------------------------------------
>
> Key: SOLR-2714
> URL: https://issues.apache.org/jira/browse/SOLR-2714
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: Trygve Laugstøl
> Attachments: SOLR-2714.patch
>
>
> The parser in JsonLoader does not handle null fields when adding a document over http+json.
> Given this document:
> {code}
> [{
> "timestamp":"2011-08-17T14:11:49.201Z",
> "correlationId":"N44YFGSQNC",
> "logType":"event",
> "short":"Invalidating session: 4zy6cvdtmvu1erlay0sn6rhz",
> "long":null
> }]
> {code}
> I'm getting a response code=400 and the error message "should finish doc first" in the logs.
> It seems that JsonLoader is missing case for JSONParser.NULL in the parser even switch.
> * https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/JsonLoader.java
> * https://svn.apache.org/repos/asf/labs/noggit/src/main/java/org/apache/noggit/JSONParser.java
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2714) JsonLoader does not handle null
fields
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086360#comment-13086360 ]
Yonik Seeley commented on SOLR-2714:
------------------------------------
Hmmm, while the JSON loader never advertised the ability to handle null values, there's probably no reason not to do so.
I guess we should just drop null values.
> JsonLoader does not handle null fields
> --------------------------------------
>
> Key: SOLR-2714
> URL: https://issues.apache.org/jira/browse/SOLR-2714
> Project: Solr
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: Trygve Laugstøl
>
> The parser in JsonLoader does not handle null fields when adding a document over http+json.
> Given this document:
> {code}
> [{
> "timestamp":"2011-08-17T14:11:49.201Z",
> "correlationId":"N44YFGSQNC",
> "logType":"event",
> "short":"Invalidating session: 4zy6cvdtmvu1erlay0sn6rhz",
> "long":null
> }]
> {code}
> I'm getting a response code=400 and the error message "should finish doc first" in the logs.
> It seems that JsonLoader is missing case for JSONParser.NULL in the parser even switch.
> * https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/JsonLoader.java
> * https://svn.apache.org/repos/asf/labs/noggit/src/main/java/org/apache/noggit/JSONParser.java
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-2714) JsonLoader does not handle null field
values
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley updated SOLR-2714:
-------------------------------
Priority: Minor (was: Major)
Issue Type: Improvement (was: Bug)
Summary: JsonLoader does not handle null field values (was: JsonLoader does not handle null fields)
> JsonLoader does not handle null field values
> --------------------------------------------
>
> Key: SOLR-2714
> URL: https://issues.apache.org/jira/browse/SOLR-2714
> Project: Solr
> Issue Type: Improvement
> Affects Versions: 3.3
> Reporter: Trygve Laugstøl
> Priority: Minor
> Attachments: SOLR-2714.patch
>
>
> The parser in JsonLoader does not handle null fields when adding a document over http+json.
> Given this document:
> {code}
> [{
> "timestamp":"2011-08-17T14:11:49.201Z",
> "correlationId":"N44YFGSQNC",
> "logType":"event",
> "short":"Invalidating session: 4zy6cvdtmvu1erlay0sn6rhz",
> "long":null
> }]
> {code}
> I'm getting a response code=400 and the error message "should finish doc first" in the logs.
> It seems that JsonLoader is missing case for JSONParser.NULL in the parser even switch.
> * https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/JsonLoader.java
> * https://svn.apache.org/repos/asf/labs/noggit/src/main/java/org/apache/noggit/JSONParser.java
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org