Copied to clipboard

Flag this post as spam?

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

  • Dibs 131 posts 642 karma points
    Nov 08, 2018 @ 12:31

    Dear Umbraco Examine Experts

    Making use of FluentSearchAPI, the method .MultipleCharacterWildcard() works as expected in the code below, debugging displays the following value Query={+contentRTE:query*}

    var query = Request.QueryString["query"];
    var searcher = Examine.ExamineManager.Instance.SearchProviderCollection["CharlieSearcher"];
    var searchCriteria = searcher.CreateSearchCriteria();
    var searchQuery = searchCriteria.Field("contentRTE", query.MultipleCharacterWildcard()).Compile();
    var searchResults = searcher.Search(searchQuery);
        if (searchResults.Any())
                @foreach (var result in searchResults)
                    var node = Umbraco.TypedContent(result.Id);
                        <div class="row">
                            <a href="@node.Url"> @node.Name</a> 
            <p>No search results found for <strong>@query</strong></p>

    When i make use of .SingleCharacterWildcard() in place of .MultipleCharacterWildcard() no results are found for the query search term. Debugging displays the following value Query={+contentRTE:qu?ry?}

    I am on the understanding i should see Query={+contentRTE:qu?ry} in debugging and see results for 'query' in my results.

    Am i missing something ?


Please Sign in or register to post replies

Write your reply to: