Closed. This question is
opinion-based。它当前不接受答案。
想改善这个问题吗?更新问题,以便
editing this post用事实和引用来回答。
在6个月前关闭。
Improve this question
假设我们有一个可以包含50-60个字段的文档。例如:
{
"priceCurrency": "USD",
"price": "119.99",
"priceValidUntil": "2020-11-05",
"brand": "Acme",
"logo": "http://www.example.com/logo.png",
"name": "WidgetPress",
"category": "Widgets",
"image": "http://www.example.com/image.jpg",
"description": "This is an excellent widget with 21 features and 4 colors."
}
现在,在这60个字段中,我们可以查询20-25个字段。因此,这意味着我们将需要在所有这些字段上建立索引。
在这些字段上形成的查询可以包含相等和不相等运算符。查询还可以具有AND / OR / NOT运算符。
不需要全文本搜索。 对于这种情况,首选ElasticSearch或MongoDB吗?
我读过一篇文章,在mongo中支持多于5个索引可能会使写入速度变慢。因此,在这种情况下,应首选ES。
我们的数据约为200 GB。 RPS将是20,000。
编辑问题-只是想知道ScyllaDB是否适合这种用例?
尽管不是您问题的确切答案,但this应该根据功能和非功能需求为您提供一些有关如何选择系统的想法。
符合您的主要要求,是的,您不需要为没有进行任何搜索的数据建立索引,可以使用index option禁用特定字段的索引(注意默认值为true)。这将减小倒排索引的大小并提高性能。
第二部分是使用过滤器上下文,因为您没有全文本搜索要求,并且Elasticsearch在过滤器上下文中缓存数据,这使其速度非常快,而无需引入外部缓存系统(例如Redis等)。
可以在https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#filter-context中找到有关过滤器缓存的更多信息。
官方文档,并引用同一文档:
Frequently used filters will be cached automatically by Elasticsearch,
to speed up performance.
另外,
In a filter context, a query clause answers the question “Does this
document match this query clause?” The answer is a simple Yes or
No — no scores are calculated. Filter context is mostly used for
filtering structured data, e.g.
Does this timestamp fall into the range 2015 to 2016? Is the status
field set to "published"
这似乎是您的确切要求。