I am indexing data from MongoDB that roughly looks like
{
"name": "John Doe",
"age": "25",
"education": [
{
"title": "Masters",
"status": 53,
"finalProject": {
"title": "Integrating Advanced STJs using KKO",
"status": "In Progress"
}
},
{
"title": "Software Engineering",
"status": 52,
"finalProject": {
"title": "Use of LPI in Multi-sanctioned BPDs",
"status": "Completed"
}
},
{
"title": "Pre-Engineering",
"status": 51
},
{
"title": "Matriculation",
"status": 52
}
]
}
Notice that I have got two status fields; one at education.*.status
which is integer and the other at education.*.finalProject.status
. How can I specify copyFields for both?
I considered specifying them as follows in my schema
<field name="projectStatus" type="string" stored="true" indexed="true" multiValued="true"/>
<copyField source="*.finalProject.status" dest="projectStatus"/>
<field name="educationStatus" type="int" stored="true" indexed="true" multiValued="true"/>
<copyField source="*.status" dest="educationStatus"/>
but both the patterns seem to be conflicting as *.status
already covers *.finalProject.status
. How can I specify them both in separate copy fields?