solr - 如何提高 Solr 多重 OR 运算的性能
问题描述
给定情况
在 solr 中,我需要做类似的事情
q=(
menu_name: A OR
menu_name: B OR
menu_name: C OR
...
)
这需要大量的 OR 操作。
问题
我担心太多的“或”可能会导致性能问题。
我认为如果我可以使用“set”的 IN 操作,我可以提高性能。(不在列表中)由于集合的 IN 操作需要 N(1)。
The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets.
问题
- 当您查询多个 OR 时,solr 是否在内部使用 set 的 IN 操作?或者......它是否使用列表的IN操作?
- 在这种情况下有什么方法可以提高性能,你能分享我的见解吗?
解决方案
推荐阅读
- c++ - C++异常处理内部循环不起作用
- c++ - timeGetTime 是衡量游戏循环时间的好方法吗?
- json - 我可以使用 Domino10 NotesJson 对象修改 JSON 树吗?
- sql - PDO - CREATE 和 DROP 语句可以在同一个查询中吗?
- postgresql - 是否可以将 Debezium 连接到 9.6 以上版本的 Postgres 从站?
- c - OpenSSL - BIGNUM 检查问题
- excel - VBA用户表单,如何存储先前输入的值以供下次打开
- c# - App.config 转换无法根据环境工作
- swift - 如何强制 Swift 等待前面的代码完成?
- r - R:基于观察结果的条件