How can apply a analyzer to the non-funtional 'type' in my mapping, and
them use that 'type' as filter query in my searches. I'm not clear on how
to access properties of child objects.
How can apply a analyzer to the non-funtional 'type' in my mapping, and
them use that 'type' as filter query in my searches. I'm not clear on how
to access properties of child objects.
If you provide this document like this to elasticsearch:
curl -XPUT 'localhost:9200/my_index/context/1' -d '{
"myContent":{
"product":{
"name":"test",
"date":"2013",
"features":{
"non-functional":{
"type": "hardware"
},
"functional":{
"name":"search"
}
}
}
}
}'
Do a refesh (Happens automatically every second by default, but just
showing it to complete the example):
curl -XGET 'localhost:9200/my_index/_refresh'
And then search with a filtered query like this:
curl -XGET 'localhost:9200/my_index/_search' -d '{
"query" : {
"filtered" : {
"filter" : {
"term" : {"myContent.product.features.non-functional.type" :
"hardware"}
}
}
}
}'
The search result should include the previous index document.
How can apply a analyzer to the non-funtional 'type' in my mapping, and
them use that 'type' as filter query in my searches. I'm not clear on how
to access properties of child objects.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.