I have a set of pdf, word and excel documents inside a document set. There are multiple document sets available and when i use the default OOTB search functionality and search within the document set, the results are displayed as expected.

For example, if i search for the word "SharePoint" then all documents that have the word SharePoint is getting displayed properly. Now what i require is to find how many times the word "SharePoint" is found in each of the document within all the files that are present in the document set.

I tried using the KeywordQuery and SearchExecutor class but it returns the same results as I see in the default search but what I require is the word frequency count in each document.

Example: DocumentA.pdf – SharePoint (10) DocumentB.pdf – SharePoint (5)

Is there any API available in SharePoint 2013 that could help me to achieve this? Does SharePoint even performs this? or does it stops searching in a file when it first encounters the word?

When I search for something does SharePoint search inside the list of indexed files every time? If yes how does it work under the hood and is there a way that I can perform the same?

Any pointers or code snippets would be highly helpful.

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.