Using Sitecore 7.2 with Coveo for Sitecore 3.0 (784), the following advanced queries are used to filter search results to return pages from a specific start locations:
args.queryBuilder.advancedExpression.add(" *= "/{Guid of a start location}"");
and also:
args.queryBuilder.advancedExpression.addFieldExpression("","*=", ["/sitecore/content/home"])
But none of them return results. Any suggestions?
Answer by Luc Bergeron · Nov 04, 2014 at 04:05 PM
Hi Simon,
As far as I know, the "longid" field is not marked as a facet by default. So it won't work with the wildcard operator unless you mark it as facet.
Also, I guess the code sample that uses the "_fullpath" field should have a "*" at the end of the value.
args.queryBuilder.advancedExpression.addFieldExpression("<%= ToCoveoFieldName("_fullpath") %>","*=", ["/sitecore/content/home*"])
This way, it should return the "/sitecore/content/home" item and all its children.
If it still doesn't work, I would check which search query is sent to CES and validate if the query works from the Index Browser.
Hope this helps.
Using .On() builder query to filter dynamically 2 Answers
Embedded Document 1 Answer
Returning zero or 1 result on production website 1 Answer
User search history in omnibox 1 Answer
Rebuilding search index exception : inactivity timeout expired 0 Answers