I have some kind of issue and I can't solve it following the documentation. I have this custom JSON that I can't flatten it because comes from an external source. I'm omitting parts of the code to make it easy to read and understand. This is the document I'm trying to index:
{
"status": "ok",
"message": {
... some other fields ...
"title": "The good and the bad",
"editor": [
{"given": "Bianca", "family": "Racioppe", "sequence": "additional", "affiliation": [] },
{"given": "Virginia", "family": "C\u00e1neva", "sequence": "additional", "affiliation": []}],
... other fields ...
}}
This is my schema:
<field name="editors" type="string" multiValued="true" indexed="true" stored="true">
<field name="given_name" type="string" indexed="true" stored="true"/>
<field name="family_name" type="string" indexed="true" stored="true"/>
<field name="affiliation" type="string" multiValued="true" indexed="true" stored="true"/>
<field name="orcid" type="string" indexed="true" stored="true"/>
</field>
<field name="title" type="string" multiValued="false" indexed="true" stored="true"/>
<field... other fields ... />
I've tried also <field name="editors.given_name".... />
And what I'm mapping is:
curl -X POST "http://localhost:8983/solr/papers/update/json/docs?
split=/message|/message/autor|/message/editor
&f=editors:/message/editor
&f=editors.given_name:/message/editor/given
&f=editors.family_name:/message/editor/family
&f=editors.affiliation:/message/editor/affiliation/name
&f=title:/message/title
&f=.... other fields....
&commit=true" -H 'Content-type:application/json' --data-binary @file.json
The indexing works fine for all the fields except for the "editors" field, nothing happens! What am I doing wrong or missing?
Thanks.