Setup:
I created the following:
- a list (named Category) at the top-level site,
- a Lookup site column (SC) (named Category) on Category, which allows multiple selections, and
- a Document-based content type (named Categorized Document) with the additional Category column added.
On the top-level site (Parent) AND on a subsite (Child), I added the Categorized Document content type to Shared Documents and removed Document from the list content types.
I mapped RefinableString00 to the Crawled Property created for my site column (ows_Category).
I added three (3) items to the Category list, with Titles of "White," "Red," & "Blue."
I uploaded multiple documents to both document libraries and randomly chose Category values for some of them: each document has zero (0), one (1), two (2), or three (3) Category values.
In Security & Compliance, I created a Content search on
RefinableString00:White
and added filters on File type equals any ofdoc; docx; xls; xlsx; pdf
:RefinableString00:White(c:c)(filetype="doc")(filetype="docx")(filetype="xls")(filetype="xlsx")(filetype="pdf")
Issue:
When I run the query, it finds all of the documents from both Shared Documents libraries, ONLY where Category="White," not if it's "White" and something else.
Question:
What do I change to make sure it finds all of the documents where Category includes "White," even if it also includes other values?
Answer:
Marko Tica's syntax was super helpful to getting me closer to the final answer:
RefinableString00:{White}(c:c)(filetype="doc")(filetype="docx")(filetype="xls")(filetype="xlsx")(filetype="pdf")
In the case of a string with spaces (e.g. "Red and Blue"), the following worked:
RefinableString00:{Red}{and}{Blue}(c:c)(filetype="doc")(filetype="docx")(filetype="xls")(filetype="xlsx")(filetype="pdf")
Notes:
- Marko's answer included
{|…}
around the entire query, which is probably very helpful when working with Search. Security & Compliance's Content search wouldn't accept it, and it ultimately wasn't needed. - Marko's answer also wrapped the search text in
""
, which also returned no results. I haven't tested this with other 'Refinable' types, but my assumption is that because it's aRefinableSTRING
, the quotes weren't needed to type the query. Even in the case of a string (e.g. "Red and Blue"), the quotes weren't needed; instead, wrap each word in the phrase with{}
IN ORDER to search on the phrase.