AWS CloudSearch: different documents in 1 domain?

爷,独闯天下 提交于 2019-12-20 10:41:18

问题


I'm interested in using AWS Cloud Search for my web app. I have 3 different document types that I want to make searchable (users - articles - images).

What is the best way to do this with Cloud Search? Do I need to create 3 different AWS search domains? And does this mean i need to pay for at least 3 search instances?

Or can I put all of them in 1 domain / instance and use something like indexes or types (to use elastic search terminology)?

Thanks!


回答1:


You can try this:

  1. Add a "searchable_text" index of type text, "category" index of type literal which is faceted enabled.
  2. Upload documents of all types with full text search field as "searchable_text" and category as one of "users", "articles" or "images".
  3. Query based on category to return results from each type.

If your search query is going to be complex with many index fields, you may end up having a lot of null values in many indexed fields if you try to maintain a single domain for different document types. Empty values are not good for indexes and it's better to separate document types into their own domains if you end up there.



来源:https://stackoverflow.com/questions/15797190/aws-cloudsearch-different-documents-in-1-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!