Reputation: 3
Using either a KeywordQuery or a CamlQuery, I'm able to search my SharePoint (On premises or Office365) teamsite for items based on certain properties, for instance Filename, File extension, Last modified time, etc. However, I've been unable to find a way, using Microsoft.SharePoint.Client, to search for items based on it's content.
For example, if I have a docx file named "test.docx" with content "foobar", I have not found a way to find this file when I search for "foobar".
Is there a way to search for SharePoint items by content?
Thanks!
Upvotes: 0
Views: 771
Reputation: 456
With CAML query you can't find items (document) by content, only by Fields. The sharePoint search is here for that ! You need to use : Keyword Query Language with free-Text
But, in using the SharePoint search, you need to wait the Crawl of your documents. If your document is not crawled, it will not appear in the result search
Upvotes: 2