Working with Riak 1.4.7
I have a document that has a property that is an array of embedded documents. Here is a sample of the document:
{"prospect":true, "name":"HzNUeioPYynsGdXL6iSFvQ",
"contact_email":"contact@HzNUeioPYynsGdXL6iSFvQ.gr",
"e_shops":[{"store_url":"www.store.url.com","display_name":"hello there"},
{"store_url":"www.store2.url.com","display_name":"hello2 there"}]
}
The corresponding bucket has index enabled and works fine. For example, the following search command locate the object without problem:
search-cmd search index_name contact_email:contact@HzNUeioPYynsGdXL6iSFvQ.gr
The question here is how can I search by the store_url
for example.
store_url
is a property of an embedded document which, in turn, is an element of an array property of the main document.
1) Do I have to specify a custom schema file in order for the index to index these properties?
2) Do I have to query using some kind of special syntax?