The AND versus OR option not working as expected

Ivory Search Forums Support The AND versus OR option not working as expected

Tagged: 

Viewing 4 reply threads

You must be logged in to create new topic or reply to the topic.

  • Author
    Posts
    • #4723
      Rocketman
      Participant
      • Topics: 3
      • Replies: 12

      Hi
      In the settings Option > Search All or Any Search Terms I have set this to AND. I want it to find any post with all the search terms entered. My form searches tags.
      I have a post with 2 separate tags – ‘famous’ and ‘virgo’. These words are only in the tags.

      I then perform a search for ‘virgo famous’ expecting it to find any post with both ‘virgo’ and ‘famous’ anywhere in it.

      But it doesn’t find anything.

      If I change the tags in the post to a single tag, either ‘famous virgo’ or ‘virgo famous’, it does find it.

      So it’s not looking for the terms as individual tags, but for any single tag that has both terms in it.

    • #4739
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,735

      I hope you are well today and thank you for your question.

      The option “Search All or Any Search Terms” only applies to a single term and not multiple terms.

      For example, If you have a term called “Hello World” and If you have set the option to AND then it only returns the result If you search for “Hello World” and not “Hello Friend” or if one term contains a word “Hello” and other “World”.

      Best regards,
      Ivory Search Support

      • #4748
        Rocketman
        Participant
        • Topics: 3
        • Replies: 12

        Hi
        But that is what I’m saying.
        I have set up a post called ‘Sapphire – September’ on birthstonebuzz.com so you can see.
        The plugin option is set to AND.
        There are 2 tags on the post, one ‘ivory’ and one ‘search’.
        If you search ‘ivory search’ or ‘search ivory’ it doesn’t find it.

    • #4753
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,735

      It seems I didn’t explain it clearly to you, therefore, you didn’t understand it.

      Let me explain to you again, the AND condition is only considered for one tag and not on multiple tags that you are considering.

      There are 2 tags on the post, one ‘ivory’ and one ‘search’.
      If you search ‘ivory search’ or ‘search ivory’ it doesn’t find it.

      In this case, there isn’t any tag containing both the words ‘ivory search’ or ‘search ivory’ on your website therefore it doesn’t return anything. As said above it doesn’t consider multiple tags.

      • #4754
        Rocketman
        Participant
        • Topics: 3
        • Replies: 12

        What I am trying to do is have search find any post that includes all of the search words, but as individual words, not as a phrase.

        I don’t want it to treat the words as a phrase unless they are surrounded by quotes. Ivory search does accept quotes around search words and correctly searches for a phrase if the quotes are used. And it also correctly searches in the title and description for individual words if the quotes are not used.

        But you are saying it doesn’t do this in tags. Even though no quotes are used around the words, it searches tags as if it is a phrase and only returns the post if there is a tag that exactly matches the search words in the exact same order. So AND has no real effect in the tags.

        That isn’t what I expected and hence my confusion. Just as it AND’s or OR’s words and phrases in the title and description, I thought it would do the same in tags and AND or OR tags together.

        This is a problem as there is no way then to have it return a post if the individual words entered in the search, without quotes, are only in the tags as separate tags. They would have to be in tags as a single tag that exactly matches the search word for word in the same order. Like a phrase.

        Is there anyway to have it return a post if the search is for say 3 words, without quotes, so it’s not a phrase, and the words are in separate tags?

    • #4764
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,735

      Currently, the plugin does not provide functionality that you are trying to achieve regarding the tags but we will consider this to be implemented in the future version of the plugin.

      • #4765
        Rocketman
        Participant
        • Topics: 3
        • Replies: 12

        That would be a good change as the way it is doesn’t logically apply an AND operator to tags. Thanks for the reply. Just means I can’t use it for what I intended and will have to rethink. Sadly, I love the plugin, but may have to use another.

    • #4768
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,735

      Sure, we will implement it in the future version of the plugin.

      Do share here If you find any other plugin that achieves the desired functionality.

Viewing 4 reply threads

You must be logged in to create new topic or reply to the topic.