简体   繁体   English

AWS CloudSearch:1个域中的不同文档?

[英]AWS CloudSearch: different documents in 1 domain?

I'm interested in using AWS Cloud Search for my web app. 我有兴趣将AWS Cloud Search用于我的网络应用程序。 I have 3 different document types that I want to make searchable (users - articles - images). 我有3种不同的文档类型,我想要搜索(用户 - 文章 - 图像)。

What is the best way to do this with Cloud Search? 使用Cloud Search执行此操作的最佳方法是什么? Do I need to create 3 different AWS search domains? 我是否需要创建3个不同的AWS搜索域? And does this mean i need to pay for at least 3 search instances? 这是否意味着我需要支付至少3个搜索实例?

Or can I put all of them in 1 domain / instance and use something like indexes or types (to use elastic search terminology)? 或者我可以将它们全部放在1个域/实例中并使用索引或类型之类的东西(使用弹性搜索术语)?

Thanks! 谢谢!

You can try this: 你可以试试这个:

  1. Add a "searchable_text" index of type text, "category" index of type literal which is faceted enabled. 添加文本类型的“searchable_text”索引,启用分面的类型文字的“类别”索引。
  2. Upload documents of all types with full text search field as "searchable_text" and category as one of "users", "articles" or "images". 使用全文搜索字段将所有类型的文档上载为“searchable_text”,将类别上载为“用户”,“文章”或“图像”之一。
  3. Query based on category to return results from each type. 基于category查询以返回每种类型的结果。

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. 空值对索引不利,如果你最终将文档类型分成自己的域,则最好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM