Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andy 3 posts 73 karma points
    Nov 17, 2023 @ 04:17
    Andy
    0

    Exact match syntax on members index returning partical matches

    Hi people,

    Relating to Umbraco version 8.18.4.

    We're noticing strange behaviour when executing a query the members index using the examine management UI through backoffice.

    Basically, even when the query syntax is looking for an exact match, partial matches are also returned.

    For example, let's query a field named 'department' for the term "Management".

    The retuned results include any variation of management, eg. "Senior Management" and "General Management" is also returned.

    Here's the query syntax: +department:"Management", see screenshots below.

    enter image description here

    enter image description here

    enter image description here

    Any thoughts on how to perform an exact match search?

    Thanks in advance.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Nov 21, 2023 @ 14:14
    Huw Reddick
    0

    It isn't simple I'm afraid because the words are tokenised so since both strings contain Management they will be returned in the results, however look at the last few posts in this thread to get some ideas

    https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/93984-is-it-possible-to-return-a-single-document-exact-match-using-examine

  • Andy 3 posts 73 karma points
    Nov 22, 2023 @ 08:36
    Andy
    0

    All good thanks for the reference.

    The TransformingIndexValues event to set a custom queryable field with the value prefixed and suffixed will do the trick nicely.

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft