2

Is it possible to build a "full text" KQL search query in SharePoint 2013 (without targeting managed properties) that will not query the contents of the document itself. i.e. we only want to return matches on the Title, Keyword and Comments fields but for complex reasons we cannot use managed properties.

Is there a way to exclude document contents from the index and/or a query?

2

If you don't "target" managed properties your KQL query will always include full text. To achieve what you seek you could create a managed property that includes the common crawled properties that you normally target and then just query the one managed property.

  • Hi Matthew, I've tried the approach you suggest where you map all required crawl properties to one Managed Property. I made sure to select "Include content from all crawled properties", but when I query against the managed property it is only querying against the first crawled property associated with it. I'm interested to know if you see the same behaviour? (SP2013 SP1). – j.strugnell Feb 2 '15 at 17:06
  • What is your query? – Matthew McDermott Feb 3 '15 at 13:46
  • Using the Search Query tool, I'm specifying a path to restrict to a specific library, and then I'm using the Managed Property which is mapped to crawled properties for Keywords, Description and Title (in that order). With that managed property (lets pretend it's called MergedProperty) I have syntax such as MergedProperty:SomeTerm. However I only get matches where "SomeTerm" exists in the Keyword crawled property, presumably because that is the first in the list. – j.strugnell Feb 3 '15 at 17:06
  • In that case why not use an OR query? – Matthew McDermott Feb 4 '15 at 14:28
  • I am now using an Or query, it just would have been a nicer solution if SharePoint worked how you expect it to. Thank you for your help. – j.strugnell Feb 4 '15 at 18:44

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.