Copied to clipboard

Flag this post as spam?

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


  • Adam Gärdelöv 8 posts 80 karma points
    Mar 17, 2023 @ 13:46
    Adam Gärdelöv
    0

    Help with examine search query

    I have created a custom index that indexes the types and properties I want. This works fine.

    Now, I want to use the index to search using wildcard search.

    However, I am getting a lot of content that doesn't contain the search query at all. What am I doing wrong?

        var query = index.Searcher.CreateQuery(IndexTypes.Content, BooleanOperation.Or)
            .Field("name", searchQuery.MultipleCharacterWildcard())
            .Or()
            .Field("title", searchQuery.MultipleCharacterWildcard())
            .Or()
            .Field("preamble_sv", searchQuery.MultipleCharacterWildcard())
            .Or()
            .Field("preamble_en", searchQuery.MultipleCharacterWildcard());
    

    If I search for 'alb', I get this content which doesn't contain 'alb' at all.

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft