You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by forest_soup <ta...@gmail.com> on 2016/03/17 06:37:12 UTC

Is there any JIRA changed the stored order of multivalued field?

We have a field named "attachmentnames":
  <field name="attachmentnames" type="text_general" indexed="true"
stored="true" multiValued="true" omitNorms="true"/>

We do POST to add data to Solr v4.7 and Solr v5.3.2 respectively. The
attachmentnames are in 789, 456, 123 sequence: 

{
	"add": {
		"overwrite": true,
		"doc": {
			"id":"1",
			"subject":"111",
          "owner":"1",
          "sequence":"1",
          "unid":"1",
          "customerid":"1",
          "servername":"1",
          "noteid":"1",
/*          "attachmentnames":"789",
          "attachmentnames":"456",
          "attachmentnames":"123"*/
		}
	}
}

And we do GET to select data from solr v4.7 and solr v5.3.2 respectively:
http://host:port/solr/collection1/select?q=id:1&wt=json&indent=true

solr v4.7 response:
{
  "responseHeader":{
    "status":0,
    "QTime":160,
    "params":{
      "indent":"true",
      "q":"id:1",
      "wt":"json"}},
  "response":{"numFound":1,"start":0,"maxScore":0.30685282,"docs":[
      {
        "id":"1",
        "subject":"111",
        "owner":"1",
        "sequence":1,
        "unid":"1",
        "customerid":"1",
        "servername":"1",
        "noteid":"1",
/*        "attachmentnames":["123",
          "456",
          "789"],*/
        "_version_":1529020749012008960}]
  }}

solr v5.3.2 response:
{
  "responseHeader":{
    "status":0,
    "QTime":37,
    "params":{
      "q":"id:1",
      "indent":"true",
      "wt":"json"}},
  "response":{"numFound":1,"start":0,"docs":[
      {
        "id":"1",
        "subject_store":"111",
        "owner":"1",
        "sequence":1,
        "unid":"1",
        "customerid":"1",
        "servername":"1",
        "noteid":"1",
/*        "attachmentnames":["789",
          "456",
          "123"]*/,
        "_version_":1529046229145616384}]
  }}

Is there any JIRA fixed making this order changed? Thanks!



--
View this message in context: http://lucene.472066.n3.nabble.com/Is-there-any-JIRA-changed-the-stored-order-of-multivalued-field-tp4264325.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Is there any JIRA changed the stored order of multivalued field?

Posted by forest_soup <ta...@gmail.com>.
Thanks! That's very helpful!



--
View this message in context: http://lucene.472066.n3.nabble.com/Is-there-any-JIRA-changed-the-stored-order-of-multivalued-field-tp4264325p4271312.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Is there any JIRA changed the stored order of multivalued field?

Posted by Chris Hostetter <ho...@fucit.org>.
: We do POST to add data to Solr v4.7 and Solr v5.3.2 respectively. The
: attachmentnames are in 789, 456, 123 sequence:
	...  
: And we do GET to select data from solr v4.7 and solr v5.3.2 respectively:
: http://host:port/solr/collection1/select?q=id:1&wt=json&indent=true
	...
: Is there any JIRA fixed making this order changed? Thanks!

https://issues.apache.org/jira/browse/SOLR-5777

The bug wasn't in returning stored fields, it was in how the JSON was 
parsed when a field name was specified multiple times (instead of a single 
time with an array of values) when adding a document.





-Hoss
http://www.lucidworks.com/