0

I have search results coming based on meta fields Title and Description. When I search for the partial keyword "fir". results are coming but when I search for the full keyword "first" no results are coming.

Below is the code snippet :

var predicate = PredicateBuilder.True<IndexModel>();
            foreach (var t in searchTerm.Split(' '))
            {
                var searchSplitTerm = t;
predicate = predicate.Or(x => x.Title.Contains(searchSplitTerm).Boost(20f));
predicate = predicate.Or(x => x.Description.Contains(searchSplitTerm).Boost(10f));
}

The description filed contains the below value in Sitecore lab / first / second.

9
  • did you try PredicateBuilder.False<IndexModel>? Jun 16, 2023 at 13:05
  • yes tried but same issue.
    – aditya
    Jun 16, 2023 at 13:50
  • what difference can you see when you see your index query from the search log for both search terms? Jun 16, 2023 at 14:18
  • no difference in query just search parameter changes from "fir" to "first"
    – aditya
    Jun 16, 2023 at 14:50
  • same result when you run it in solr dashboard as well? Jun 16, 2023 at 14:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.