Copied to clipboard

Flag this post as spam?

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


  • Josefine 28 posts 140 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 28 posts 140 karma points
    Oct 27, 2021 @ 11:17
    Josefine
    2

    Thank you! 😃

    Josefine

Please Sign in or register to post replies

Write your reply to:

Draft