Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Searching custom objects - order by relevancy?

Vote:
 

Hi,

I have some custom objects indexed and would like to know if, when searching, I don't specify a sort order will the results be ordered be relevancy by default? I would assume they are?

Also, is it possible to get the relevancy score for each result at the time of searching for display and to prove that the results are in the correct order (according to the score)?

Thanks,

Mark

#202657
Mar 28, 2019 15:44
Vote:
 

Hi Mark,

Yeah, you're completely right—by default search results are sorted by relevance (as per the Episerver Find documentation).

For the score, check out the SearchHit class: it has a Score property. Whether you call GetResult() or GetContentResult() you can get Hits from the SearchResults class.

/Jake

#202678
Edited, Mar 28, 2019 20:17
Vote:
 

Great, thanks Jake

#203211
Apr 11, 2019 15:36
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.