[ 
https://issues.apache.org/jira/browse/SOLR-6633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14217912#comment-14217912
 ] 

Noble Paul commented on SOLR-6633:
----------------------------------

bq.So, the advantage of not using the parameter syntax above is that it will 
automatically figure out what the uniqueKeyField is from the schema? Similar to 
the UUID URP?

yes and no. I want this to work seamlessly even if  uniqueKey is changed 
without mucking up with solrconfig.xml . I also want it to just work when there 
is no uniqueKey present in json. Basically, out of the box, it should just work 
for any json. I hate to tell newbies that they need to edit solrconfig.xml to 
just get anything working

I would recommend this only if you are a newbie . I should document in place to 
do the explicit mappings with wildcards .

bq.And what happens if original JSON is super fat, can we specify exclusion 
rules.

No, there are only inclusion rules. but the sytax is quite powerful to achieve 
that

bq.Again, similar to UUID URP one can add into the chain.

URP just fails the simplicity  test. It is extremely hard for even experts to 
get their head around.
 I HATE the fact that we recommend hard to do configuration to everyone. If we 
want to get the first time users on board we will need to stop all that. First 
time users just need stuff to work. 



> 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

Reply via email to