How to do an IN query in Solr?

前端 未结 2 1716
有刺的猬
有刺的猬 2020-12-28 13:10

i\'m having documents with a multivalued field \"sharedTo\" which contains the groups that the document is shared to. Now I want to find all documents that are shared to at

相关标签:
2条回答
  • 2020-12-28 13:48

    if your default operator is OR, then you can just give the query as

    sharedTo:('foo' 'bar')

    If your default operator is AND, then you'll have to do it like this: sharedTo:(foo OR bar)

    0 讨论(0)
  • 2020-12-28 14:00

    The above solution did not work for me. But this syntax did

    column_name:+(value1 value2)

    http://harmssite.com/2012/09/solr-query-for-mimicking-sql-in-operator-functionality/

    0 讨论(0)
提交回复
热议问题