I'm trying to implement a search using Examine and need to do a search by search term and tags (Umbraco tags). I see there have been a few posts around tags and how they are stored in the index that causes issues e.g. tags stored as "tag1,tag2" and searching for "tag1" does not return any results.
In my scenario I am splitting the tags and adding each one to the query so that the query looks like:
Now if I have an article that has "museum" in the title and tags "tag1" and "tag5" passing in the tags in the order "tag1" and "tag5" returns this article.
However if I reverse the tag order then the article is not returned.
Has anyone experienced a similar scenario or know how I might resolve this?
In case anyone is interested I've managed to get this working. I reversed the logic so that I'm adding the filters to the query first (using OR) then add the search term as an AND. This seems to do what I need it to.
Examine qury with AND and multiple OR
Hi,
I'm trying to implement a search using Examine and need to do a search by search term and tags (Umbraco tags). I see there have been a few posts around tags and how they are stored in the index that causes issues e.g. tags stored as "tag1,tag2" and searching for "tag1" does not return any results.
In my scenario I am splitting the tags and adding each one to the query so that the query looks like:
Now if I have an article that has "museum" in the title and tags "tag1" and "tag5" passing in the tags in the order "tag1" and "tag5" returns this article.
However if I reverse the tag order then the article is not returned.
Has anyone experienced a similar scenario or know how I might resolve this?
Thanks in advance,
Mark
In case anyone is interested I've managed to get this working. I reversed the logic so that I'm adding the filters to the query first (using OR) then add the search term as an AND. This seems to do what I need it to.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.