Simple search for multiple tags


(Dor Juravski) #1

Hello, despite looking at examples and documents I cannot run this simple search in the discover screen:
tags: A and B
Meaning all the records with both tag "A" and and tag "B"
I can search for tags:A

Failed with:
tags:(a and b)
tags:{a and b}
tags:(a,b)
tags:a,b
tags:a and b


(AlonaN) #2

Hi Dor,

try writing AND instead of and
'And' and 'OR' should be used with capital letters
"tags:a AND tags:b" should work

Let me know if it helps
Alona


(Thomas Neirynck) #3

hi @dorj1234,

can you do either:
tags:(+a +b)
or
tags:(a AND b)


(Dor Juravski) #4

Thank you both ! using "AND" worked. Did I miss that in the documentation somewhere?


(Thomas Neirynck) #5

yeah, it's a little buried in the Lucene documentation. https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#AND


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.