Linq .Contains() method not working for "IEnumerable Paths;" in Sitecore
I'm attempting to filter my search results to descendants of the current page, however on my search query
query.Where(s => s.Paths.Contains(rootId)); //where rootId is ID
I get back 0 results.
The coveo query generated looks like this (@fz95xpath20794==cf5a39a3fbc44cfc95ab12d1c82f1b03)
I tried writing a coveo query to return me results using
(@fz95xpath20794*="*cf5a39a3fbc44cfc95ab12d1c82f1b03*") and i still got back nothing. when run a separate query (off of templateId) i get back all the results i expect.
I looked into the Path field in the field set configuration, and see that "free text search" is unchecked, (checking it and applying changes throws an "URL-encoded form data is not valid" error) even unchecked i had hope that my config value
<fieldType fieldName="_path" isFacet="true" includeForFreeTextSearch="true" isMultiValue="true" ... >
would set that to be search-able, but it doesn't seem to be the case.
I'm running out of ideas and i would love some guidance. Thanks
_path field should be configured like this to work :
<fieldType fieldName="_path" isFacet="true" isMultiValue="true" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" />
It is important that it is set as facet and multi-value. Not free-text search.
Queries with a field and an operator are not free-text queries.
After changing the configuration file, you need to rebuild your index because CES needs to rebuild its caches for the field for all the documents.
Also, never change the options on the fields directly in the Administration Tool field set because they will be overriden with the configurations set in the config file when the next item will be indexed.