Say I have 2 fields. x and y.
Following are their schema definitions:
<field name="x" type="string" stored="true" indexed="true" multiValued=
"true" />
<field name="y" type="string" stored="true" indexed="true" multiValued=
"true" />
Also, there is this copy field, that copies the values from y to x.
<copyField source="y" dest="x"/>
If I make the following indexing request (non-atomic regular indexing
request)
{
"id": "doc",
"x": ["a", "b"],
"y": ["c", "d"]
}
then I end up with the following document:
{
"id": "doc",
"x": ["a", "b", "c", "d"],
"y": ["c", "d"]
}
But now, if I make the following indexing request (atomic update),
{
"id": "doc",
"y": { "set" : [ "e", "f" ] }
}
I end up with the following document:
{
"id": "doc",
"x": [ "e", "f" ],
"y": [ "e", "f" ]
}
What I instead really want, is the the following document
{
"id": "doc",
"x": [ "a", "b", "e", "f" ],
"y": [ "e", "f" ]
}
I know that I am violating the atomic indexing constraint that requires the
copy field destinations to be stored=false but I need the field x to be
stored=true.
Is there any way to handle this in Solr or I will need to cook up my own
external solution in some way?
Thanks in advance!