AWS CloudSearch:在1个域不同的文件呢?不同、文件、AWS、CloudSearch

2023-09-11 10:52:00 作者:当爱已成往事

我感兴趣的使用AWS云搜索我的web应用程序。 我有我想要搜索的3种不同的文件类型(用户 - 文章 - 图像)。

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).

什么是与云搜索做到这一点的最好方法是什么? 我是否需要创建3个不同的AWS搜索域?而这是否意味着我需要支付至少3搜索实例?

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?

或者,我可以把所有的人都在1个域/实例,并使用类似的索引或类型(使用弹性的搜索术语)?

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

谢谢!

推荐答案

您可以试试这个:

添加类型的文本searchable_text指数型字面的一类指标是方位的功能。 在所有类型的全文搜索字段为searchable_text类和用户,公司章程或图像之一的上传文件。 根据从每种类型的返回结果的查询。 Add a "searchable_text" index of type text, "category" index of type literal which is faceted enabled. Upload documents of all types with full text search field as "searchable_text" and category as one of "users", "articles" or "images". 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.