ive got a basic search solution working based on examine, but want to incorporate the ability to cater for fuzzy searching, however im not sure how to implement this, i found examples adding .fuzzy(0.8) to the search strings but this doesnt work....
I'm not good with Fluent queries of the top of my head, but one thing you can do to simplify it is to create a separate IndexSet with just the content you want to search on. It appears that you are excluding a bunch of document types. You could create an indexset with just the doc types you want to index or one that excludes the ones you don't want to search on (but don't do both at the same time). For example on defining IndexSets see http://our.umbraco.org/documentation/reference/searching/examine/full-configuration.
Mark - by doesn't work do you mean it won't compile or it isn't returning the results you are expecting?
If searchTerm is a string you should be able to add .Fuzzy() to the string. Check the parameter type of Fuzzy() - if it is a float, you can add an f to the number and this should work.
var query = searchCriteria.GroupedOr(newstring[]{"bodyText","pageTitle","pageIntro","nodeName"}, searchTerm.Fuzzy(0.8f))
fuzzy searching
ive got a basic search solution working based on examine, but want to incorporate the ability to cater for fuzzy searching, however im not sure how to implement this, i found examples adding .fuzzy(0.8) to the search strings but this doesnt work....
I'm not good with Fluent queries of the top of my head, but one thing you can do to simplify it is to create a separate IndexSet with just the content you want to search on. It appears that you are excluding a bunch of document types. You could create an indexset with just the doc types you want to index or one that excludes the ones you don't want to search on (but don't do both at the same time). For example on defining IndexSets see http://our.umbraco.org/documentation/reference/searching/examine/full-configuration.
Mark - by doesn't work do you mean it won't compile or it isn't returning the results you are expecting?
If searchTerm is a string you should be able to add .Fuzzy() to the string. Check the parameter type of Fuzzy() - if it is a float, you can add an f to the number and this should work.
Dallas
thanks
is working on a reply...