So I've got certain items indexed. Each item has a tags field, which is used in search.
Tags field example:
"tags":
"{62AEFBF6-2580-4C80-A4E2-D9E82055DCE0}
|{5A3775E0-8D9F-42FA-B34D-5E93EAA56D4C}
|{20669674-ED92-488F-BFC7-4C45F4BF3C19}
|{C926F3FB-CAF6-4606-BBC3-12033A9CD866}
|{10BC8E78-FF2B-460B-AB71-97FF5E74656A}"
So it's just a set of IDs.
Then I'm using a query to get these items by their tags.
Here's a query:
sitecore_full_path:(/.*path*/)
AND (tags: (5c076a7b\-70a0\-4d1c\-9acd\-8d69db8d21e4)
AND tags: (10bc8e78\-ff2b\-460b\-ab71\-97ff5e74656a)
AND tags: (7a111a76\-1c4f\-4918\-8f16\-54fdf856ea6b))...
The problem is that when I use this query, Azure Search returns a couple of extra items, which don't have some of the tag IDs in their tags field. Although, I'm using AND operator in my queries, so that shouldn't happen.
For example: I would like to get items that have tag A, tag B and tag C. So I use this query:
sitecore_full_path:(/.*path*/)
AND (tags: (A) AND tags: (B) AND tags: (C))...
And as a result I get 6 items. Three of them have all of these tags in the tags field, but other three - only have B and C.
So I'm wondering, is this an Azure Search issue or there is something wrong with my query or indexes?