• 请不要在回答技术问题时复制粘贴 AI 生成的内容
hello2060
V2EX  ›  程序员

问个 solr 的问题

  •  
  •   hello2060 · Mar 16, 2020 · 1646 views
    This topic created in 2273 days ago, the information mentioned may be changed or developed.

    刚用到这个东西,有个问题请教各位,多谢了

    假设我的查询里面有两个 fq 是在同一个字段上的,比如 fq=(month:"11" OR month:"12) & fq=month:"12"

    第一个 fq 返回所有 11 月 12 月的数据,第二个 fq 返回所有 12 月的数据,最终交集(12 月)的数据被返回

    我需要在查询之前先把 fq 做一些合并吗? 我这么两个 fq 去查询和只有 fq=month:"12" 性能是一样的吗?

    1 replies    2020-03-16 10:37:53 +08:00
    guxingke
        1
    guxingke  
       Mar 16, 2020
    当然不一样.
    不排除有查询重写的可能, 如果没有重写. 多一次数据加载 和 数据交集的计算.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   846 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 20:58 · PVG 04:58 · LAX 13:58 · JFK 16:58
    ♥ Do have faith in what you're doing.