Copied to clipboard

Flag this post as spam?

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


  • Sven 20 posts 112 karma points
    Dec 11, 2020 @ 14:22
    Sven
    0

    Examine query problem

    Hello !

    i'm running into some issues trying to create a Examine Query.

    In my custom index I have a field called 'TestTaxonomy' with for example the following value: umb://document/75e97ba7f01c4723a258a243bf813a1c,umb://document/e936faa0f0eb4c62aeb993de3351a1f4

    In this value I would like to be able to search 1 value and return the item if the value is found.

    My current query:

     var results = _newsIndexSearcher.CreateQuery(IndexTypes.Content, BooleanOperation.Or)
                .GroupedOr(new string[] { "TestTaxonomy_" + _currentCulture }, allThemesUdis.ToArray())
                .Not().Field("__nodeId", newsItemId)
                .OrderByDescending(new SortableField("createDate"))
                .Execute(4);
    

    This query works if my 'TestTaxonomy' field only has 1 value, however it goes wrong when there are more then 1 values.

    Examples in screenshot

    Thanks!enter image description here

  • Sven 20 posts 112 karma points
    Dec 15, 2020 @ 07:19
    Sven
    100

    Using .Fuzzy() was the solution for anyone wondering!

  • 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