var q = vehicleData.SearchQuery.Trim();
var Searcher = ExamineManager.Instance.SearchProviderCollection["RoofBoxSearcher"];
var searchCriteria = Searcher.CreateSearchCriteria(Examine.SearchCriteria.BooleanOperation.Or);
var query = searchCriteria.GroupedOr(new string[] { "vehicleType", "vehicleModel" }, q.Fuzzy(0.01f)).Compile();
IEnumerable<SearchResult> searchResults = Searcher.Search(query).OrderByDescending(x => x.Score).TakeWhile(x => x.Score > 0.05f);
The available elements in vehicleTypes are:
Alfa Romeo 159 Sportwagon
Alfa Romeo Stelvio
When I try the input "Alfa Ro" it returns the two results, however when i try with Alfa Rom or Alfa Romeo it doesn't return anything. Is there something I'm missing or misunderstanding as to why this is not working?
Same goes for "Alfa st", also returns one result and again no results for "Alfa Stelvio"
Removed the fuzzy, added * in front and after the query string. The result was that it returned two hits for "Alfa" and zero hits for "Alfa R", "Alfa Ro", "Alfa Rom" and "Alfa Rome", but two hits again for "Alfa Romeo"
Examine and understanding the result
Hi,
I've set up a examine search like this
The available elements in vehicleTypes are:
Alfa Romeo 159 Sportwagon
Alfa Romeo Stelvio
When I try the input "Alfa Ro" it returns the two results, however when i try with Alfa Rom or Alfa Romeo it doesn't return anything. Is there something I'm missing or misunderstanding as to why this is not working?
Same goes for "Alfa st", also returns one result and again no results for "Alfa Stelvio"
Try taking off the fuzzy on q and use wildcard. also you dont need to sort by score its already sorted by score by default
Removed the fuzzy, added * in front and after the query string. The result was that it returned two hits for "Alfa" and zero hits for "Alfa R", "Alfa Ro", "Alfa Rom" and "Alfa Rome", but two hits again for "Alfa Romeo"
is working on a reply...