Copied to clipboard

Flag this post as spam?

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


  • Ambert van Unen 65 posts 376 karma points
    Jul 07, 2020 @ 06:48
    Ambert van Unen
    0

    Contentquery partial search

    I'm using the following search on my website:

    Umbraco.ContentQuery.Search(keyword)

    This works fine, with the expection that partial (endings) of words aren't found.

    Lets say I search on "cookie":

    Chocolate cookie (Found)

    chocolatecookie (not found)

    cookie made of chocolate (found)

    cookiedough (found)

    How can this be modified that 'chocolatecookie' is also found? Do I need to write my own lucene query/indexer for this?

    Cheers!

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jul 08, 2020 @ 15:57
    Ismail Mayat
    0

    Ambert,

    What happens if you wildcard the query? So when you pass in keyword add * to it.

    To be honest i never use ContentQuery.Search I always use examine and when building the query you can wildcard it. Someone recently had issue with ContentQuery.Search https://our.umbraco.com/forum/using-umbraco-and-getting-started/102819-getting-maxclausecount-is-set-to-1024-error-for-umbracocontentquerysearch-text-null

  • Jose Cerqueiro 22 posts 81 karma points
    Jul 08, 2020 @ 19:34
    Jose Cerqueiro
    0

    Ambert,

    I had some problems where the Search returned no results when using the syntax Umbraco.ContentQuery.Search(keyword)

    I would suggest to take a look at this comment from Shannon

    https://github.com/umbraco/Umbraco-CMS/issues/5789#issuecomment-510720244

    And this other from Sebastiaan

    https://our.umbraco.com/forum/umbraco-8/96454-searching-not-working-with-contentquerysearch#comment-304937

    Good luck

  • Ambert van Unen 65 posts 376 karma points
    Jul 09, 2020 @ 08:30
    Ambert van Unen
    0

    I've checked both, wildcards are just seen as a regular string, so they dont work..

    As for the second, i'm getting normal results back, so thats not the problem.

    Think I'll have to write some using examine (never done so ;-))

  • 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