Copied to clipboard

Flag this post as spam?

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


  • Masoud 1 post 72 karma points
    Sep 18, 2023 @ 07:55
    Masoud
    1

    Examine: How to search content for different languages?

    Hi all,

    I need to search my content and filter the results for different languages. I'm using Umbraco CMS 11.4.2 with Examine and I have two languages: Swedish and English.

    Here's the code. Is there a way to send in the desired culture into the query? I couldn't find anything in the docs.

    _examineManager.TryGetIndex(
            Umbraco.Cms.Core.Constants.UmbracoIndexes.ExternalIndexName, out var index);
    
        var searchResult = index
             .Searcher
             .CreateQuery(IndexTypes.Content)
             .ManagedQuery(query)
             .Execute(QueryOptions.SkipTake((pageNumber - 1) * pageSize, pageSize));
    

    Thanks in advance!

  • 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