[ https://issues.apache.org/jira/browse/SOLR-6633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14217261#comment-14217261 ]
Noble Paul commented on SOLR-6633: ---------------------------------- bq.Because, in Elasticsearch, the _src field is actually used as source for several operations.. This feature is not the same. it is a feature of the {{/update/json/docs}} requesthandler . We can't do it like ES because , the same document can be updated using other commands as well bq.Finally, I am not clear on what this really means: all fields go into the 'df' . Solr is "strongly typed" , so to say. So it means we can't just put the content somewhere for searching. because all components use "df" as the default search field this component chooses to piggyback on the same field. The user can configure any other field as 'df' here. The next problem we need to address is that of uniqueKey. The component must extract the uniquekey field from the json itself or it should create one. That is the purpose of "mapUniqueKeyOnly" param We are not trying to be ES here. The use case is this. User has a bunch of json documents. He needs to index the data without configuring anything in the schema. The search result has to return some stored fields. Because Solr is "strongly typed" we can't store them in individual fields . So we must store the whole thing in some field and it made sense to store it in json itself. > let /update/json/docs store the source json as well > --------------------------------------------------- > > Key: SOLR-6633 > URL: https://issues.apache.org/jira/browse/SOLR-6633 > Project: Solr > Issue Type: Bug > Reporter: Noble Paul > Assignee: Noble Paul > Labels: EaseOfUse > Fix For: 5.0, Trunk > > Attachments: SOLR-6633.patch, SOLR-6633.patch > > > it is a common requirement to store the entire JSON as a field in Solr. > we can have a extra param srcField=field_name to specify the field name > the /update/json/docs is only useful when all the json fields are predefined > or in schemaless mode. > The better option would be to store the content in a store only field and > index the data in another field in other modes > the relevant section in solrconfig.xml > {code:xml} > <initParams path="/update/json/docs"> > <lst name="defaults"> > <!--this ensures that the entire json doc will be stored verbatim into > one field--> > <str name="srcField">_src</str> > <!--This means a the uniqueKeyField will be extracted from the fields > and > all fields go into the 'df' field. In this config df is already > configured to be 'text' > --> > <str name="mapUniqueKeyOnly">true</str> > <str name="df">text</str> > </lst> > </initParams> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org