You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Ishan Chattopadhyaya (Jira)" <ji...@apache.org> on 2020/08/08 12:05:00 UTC

[jira] [Resolved] (SOLR-14724) "multiple values encountered for non multiValued" even after adding a multiValued field

     [ https://issues.apache.org/jira/browse/SOLR-14724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ishan Chattopadhyaya resolved SOLR-14724.
-----------------------------------------
    Resolution: Invalid

Damn, I was removing the dynamic field for "*_s" instead of "*_i".

I'm closing this issue, but there's definitely something wrong with Solr. I added a field explicitly, but still dynamic field type takes preference.

> "multiple values encountered for non multiValued" even after adding a multiValued field
> ---------------------------------------------------------------------------------------
>
>                 Key: SOLR-14724
>                 URL: https://issues.apache.org/jira/browse/SOLR-14724
>             Project: Solr
>          Issue Type: Task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Ishan Chattopadhyaya
>            Priority: Major
>         Attachments: faulty.jsonl
>
>
> Steps to reproduce:
> # Create a new collection
> # Remove the dynamic field pattern for *_i
> # Add a multivalued field "body.algolia.children.children.created_at_i"
> # Index the attached document that contains multiple values for that field.
> # Boom! {{"ERROR: [doc=1017960] multiple values encountered for non multiValued field body.algolia.children.children.created_at_i: [1262006144, 1262024153, 1261970915, 1261970358, 1262014651, 1261971697, 1261978873]"}}
> {code}
> [ishan@pseries ~] $ curl "http://localhost:18983/solr/admin/collections?action=CREATE&name=hn2&numShards=1"
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":981},
>   "success":{
>     "172.17.0.2:8983_solr":{
>       "responseHeader":{
>         "status":0,
>         "QTime":351},
>       "core":"hn2_shard1_replica_n1"}},
>   "warning":"Using _default configset. Data driven schema functionality is enabled by default, which is NOT RECOMMENDED for production use. To turn it off: curl http://{host:port}/solr/hn2/config -d '{\"set-user-property\": {\"update.autoCreateFields\":\"false\"}}'"}
> [ishan@pseries ~] $ curl -X POST -H 'Content-type:application/json' --data-binary '{
>   "delete-dynamic-field":{ "name":"*_s" }
> }' http://localhost:18983/solr/hn2/schema
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":389}}
> [ishan@pseries ~] $     (reverse-i-search)`add-fi': curl -X POST -H 'Content-type:application/json' --data-binary '{
>   "add-field":{
>      "name":"body.algolia.children.created_at_i",
>      "type":"pint",
>      "multiValued":true,
>      "stored":true }
> }' http://localhost:18983/solr/hn2/schema
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":360}}
> [ishan@pseries ~] $ curl -X POST -d @faulty.jsonl -H "Content-Type: application/json" "http://localhost:18983/solr/hn2/update/json/docs?commit=true"
> {
>   "responseHeader":{
>     "rf":1,
>     "status":400,
>     "QTime":1045},
>   "error":{
>     "metadata":[
>       "error-class","org.apache.solr.common.SolrException",
>       "root-error-class","org.apache.solr.common.SolrException"],
>     "msg":"ERROR: [doc=1017960] multiple values encountered for non multiValued field body.algolia.children.children.created_at_i: [1262006144, 1262024153, 1261970915, 1261970358, 1262014651, 1261971697, 1261978873]",
>     "code":400}}
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org