Copied to clipboard

Flag this post as spam?

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


  • Josefine 30 posts 143 karma points
    Oct 27, 2021 @ 09:32
    Josefine
    1

    Umbraco.ContentQuery.Search - sensitive to upper and lowercase

    How do I make the search function not sensitive to uppercase and lowercase letters?

    I get different results i when I use uppercase or lowercase.

    var resultsList = Umbraco.ContentQuery.Search(searchTerm, Model.GetCultureFromDomains());
    

    Thanks, Josefine

  • Frank Laumann 39 posts 303 karma points
    Oct 27, 2021 @ 10:10
    Frank Laumann
    102

    Hi Josefine

    If your main goal is to give same result one solution would be to make the searchTerm all lowercase. That way it wouldn't matter what the user inputs.

    Best regards Frank

  • Josefine 30 posts 143 karma points
    Oct 27, 2021 @ 11:17
    Josefine
    2

    Thank you! 😃

    Josefine

  • 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.

Please Sign in or register to post replies