Copied to clipboard

Flag this post as spam?

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


  • Jon Frederiksen 52 posts 111 karma points
    Feb 21, 2018 @ 09:59
    Jon Frederiksen
    0

    Umbraco.TypedSearch - dash problem

    Hello guys

    It seems like the Umbraco.TypedSearch dosen't return any results when the query search contains a dash, e.g. "techno-cat". Searching for "techno" or "cat" or "techno cat" works fine, while techno-cat returns 0 results.

    Of course, I could just remove the "dash" before searching, but in one case we have a search combination of "a-bcde", so removing the dash won't find this exact search term and that's a big problem.

    This issue is discovered on sites running v. 7.

    Any idea where to look or to tweak?

  • Nik 1612 posts 7258 karma points MVP 7x c-trib
    Feb 21, 2018 @ 10:58
    Nik
    0

    Hi Jan,

    There was a discussion about this recently in Slack as it happens.

    What you need to do is escape your search term. There is a string extension method called .Escape() which is accessible via the Examine.LuceneEngine.SerachCriteria namespace :-)

    Thanks,

    Nik

Please Sign in or register to post replies

Write your reply to:

Draft