Accessing properties of child objects

If my data is in following format

"myContent":{
"product":{
"name":"test",
"date":"2013",
"features":{
"non-functional":{
"type": "hardware",
},
"functional":{
"name":"search"
}
}
}
}

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.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

If i want to use type as a filter query can i reference it using
'product.features.non-functional.type' as the field property?

On Thursday, May 30, 2013 10:31:33 PM UTC+1, es newbie wrote:

If my data is in following format

"myContent":{
"product":{
"name":"test",
"date":"2013",
"features":{
"non-functional":{
"type": "hardware",
},
"functional":{
"name":"search"
}
}
}
}

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.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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.

Martijn

On 31 May 2013 10:20, es newbie dan.tuffery@gmail.com wrote:

If i want to use type as a filter query can i reference it using
'product.features.non-functional.type' as the field property?

On Thursday, May 30, 2013 10:31:33 PM UTC+1, es newbie wrote:

If my data is in following format

"myContent":{
"product":{
"name":"test",
"date":"2013",
"features":{
"non-functional":{
"type": "hardware",
},
"functional":{
"name":"search"
}
}
}
}

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.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.