AWS CloudSearch: different documents in 1 domain?

后端 未结 1 1466
独厮守ぢ
独厮守ぢ 2021-02-04 13:13

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 bes

相关标签:
1条回答
  • 2021-02-04 14:00

    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.

    0 讨论(0)
提交回复
热议问题