问题
I am very new to azure search, basically i have created database and one collection this collection have few documents, also i have created one index .
I am using REST API to search documents, 1) my rest api service is given below.
GET https://xxxx.search.windows.net/indexes/[xxx]/docs?search=xxx&searchFields=xxxx&api-version=2015-02-28
2) My document is:{
"abc":"abcvalue",
"xyz": {
"key":"value",
"kay1":"value1"
}
}
Search result out put is : { "@odata.context": "https://xxx.search.windows.net/indexes('xxx')/$metadata#docs(id,key,key1)", "value": [ { "@search.score": 1, "id": "ccc485a8-18ea-8f06-9582-80a35ee9c567", "key": null, "key1": null }, { "@search.score": 1, "id": "bad34bb1-ed9a-bfb9-46e9-be97ac52680c", "key": null, "key1": null } }
but we are unable to search child object(xyz) fileds, where iam missing can you any one suggest me are any links
Thanks.
回答1:
In short, an Azure Search index can only have flattened documents at this time. This means you will need to take the hierarchical data in your DocumentDB and flatten it out in Azure Search. There's a really great article that discusses flattening your data here.
I hope this info helps,
Chad Campbell
Author of Adding Search Abilities to your Apps with Azure Search
来源:https://stackoverflow.com/questions/39634568/unable-to-search-child-object-fields-in-azure-search-servicesdocumentdb