【问题标题】:Doing boolean OR query string in sunspot solr在太阳黑子 solr 中执行布尔 OR 查询字符串
【发布时间】:2012-01-06 14:12:40
【问题描述】:

我只是想知道在 sunspot solr 中是否可以使用以下逻辑进行搜索:

关键字 = 橙色 OR 红橙色 OR 蓝绿色

提前感谢您的任何意见

【问题讨论】:

  • 不,如果我输入关键字为“橙色或红色”,那么它只会搜索该短语。
  • 我在这里发布了一个类似的问题。如果有人知道,请回答这个问题 - stackoverflow.com/questions/12005661/…

标签: ruby-on-rails sunspot-rails sunspot-solr


【解决方案1】:

keywords("orange red blue"){minimum_match 1} 将搜索keyword = orange or red or blue。

sunspot fulltext docs 有几种其他方法可以更改您的搜索。

【讨论】:

    【解决方案2】:

    现在的解释可能有点模糊,但似乎 sunspot solr 可以让您在查询 solr 本身之前调整搜索参数。一旦我有时间再次解决这个问题,我会更新这个答案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-22
      相关资源
      最近更新 更多