Search code examples
solrlucenesolrcloud

Solr OR query on a text field


How to perform a simple query on a text field with an OR condition? Something like name:ABC OR name:XYZ so the resulting set would contain only those docs where name is exactly "XYZ" or "ABC" Dug tons of manuals, cannot figure this out. I use Solr 5.5.0

Update: Upgraded to Solr 6.6.0, still cannot figure it out. Below are illustrations to demonstrate my issue:

  1. This works:

works

  1. This works too:

works too

  1. This still works:

still works

  1. But this does not! Omg why!?

does not work omg why


Solution

  • A wacky workaround I've just come up with:

    enter image description here