I have created the SharePoint content search webpart and search box in sp2013. When I search the world using search box the content search webpart will show the document results based on the word I searched in search box. It's working fine.but I need to get the matching count from the document. Is possible to do it in content search webpart? Or is there any Managed property available? If yes, anyone suggest better idea to do it.

  • I think your question confuses me. Question: You are searching for let's say an order number "123456". You get all results for this search term. But you want to get information about how often "123456" was found in every result item and show this in your display template. Am I right?
    – PhilFancy
    Jul 2 '18 at 6:16
  • If I search a keyword "testing" , content search webpart returns two document results. I need to sort the results based on "testing" word count.highest should be first..if document one contains 3 matching and document 2 contains 5 matching keywords , then the document 2 should show first in search webpart... Is it possible?
    – PGP
    Jul 2 '18 at 12:48
  • That is possible. You can achieve this by using KQL with the XRANK operator.
    – PhilFancy
    Jul 2 '18 at 14:16
  • @PhilFancy Tq, can you please give more idea to implement this?
    – PGP
    Jul 3 '18 at 3:55
  • In the past we were changing search result ranking by XRANK. So I knew you can change ranking by XRANK. Then just ran a google search for < xrank count of matches > and got some hits which were answered as positive outcome. So I didn't do an extra test - and did not answer your question but wrote the comment that there seems to be a way by XRANK. Have not tested it by myself as we do not need to accomplish this case right now in our environment.
    – PhilFancy
    Jul 3 '18 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.