Gravatar for

Question by, May 8, 2017 11:53 AM

Exact Match vs Contains in the rest query

We are using CoveoForSitecore 3.0.1297 + Sitecore 8.0 Update 5 + CES 7.0.8047

We use Rest Query to retrieve search results. One of the field is a Multilist field ( @fdirectapplication59613). This computed field has an association between two business entities, viz, Application & Product (1:Many). In the index collection, for every product item, this field has multiple application names semicolon (;) separated. We use the below search query. The Application name is in Chinese and hence you see encoded values. This purpose of this Query is to retrieve list of products associated with an application name. The below query returns those products which has a specific Application name alone. However, in those scenarios where the product is associated with more than one Application, The query DO NOT return those product items.

http://UE1AVEMPINX03:8080/rest/search?enableDuplicateFiltering=1&numberOfResults=10&q=((%22%22))$qre(expression:@fappearz32xinz32xtopz32xresult59613==%22True%22%20AND%20@coveokeyword==%22()%22,modifier:1000)&aq=(@flanguage59613=(zh-cn)@fhidez32xfromz32xsearchz32xresult59613%3C%3E(%22true%22)@fz95xlatestversion59613=(%221%22)(@ffullpath59613=%22/sitecore/content/mobil/industrial/cn/website%22 OR @ffullpath59613=%22/sitecore/content/mobil/industrial/global/data/equipment builders/%22)@ftemplateid59613==("{8A449A92-6C39-40D5-B7D3-7AF844D38E07}","{4E6A23C4-F990-4EF0-8C03-F5B6232AC79A}","{F3830982-448A-468F-A2ED-9019C3F035E0}","{3B314AB7-D66C-48D5-B7F8-7E6708C29DD6}","{F72A3D64-CA8E-403C-A20D-18152D67AAF8}")@fdirectapplication59613==("%E6%B6%B2%E5%8E%8B%E7%B3%BB%E7%BB%9F" ))&groupBy=[{%22field%22:%22@fdirectsubapplication59613%22 ,%22maximumNumberOfValues%22:100,%22sortCriteria%22:%22nosort%22,%22injectionDepth%22:1000},{%22field%22:%22@fsemantics59613%22 ,%22maximumNumberOfValues%22:100,%22sortCriteria%22:%22nosort%22,%22injectionDepth%22:1000},{%22field%22:%22@fproducttypetitle59613%22 ,%22maximumNumberOfValues%22:100,%22sortCriteria%22:%22nosort%22,%22injectionDepth%22:1000},{%22field%22:%22@fsynthetics59613%22 ,%22maximumNumberOfValues%22:100,%22sortCriteria%22:%22nosort%22,%22injectionDepth%22:1000}]&sortField=@ftitle59613&sortCriteria=fieldascending

The above approach is working fine for English as a language, however is not working for Chinese language (Not sure if this has some encoding for semicolon). In the above REST query if we using ‘=’ (contains functionality), it gives us the correct number of products, however, if we use ‘==’ (Exact match), it is not giving returning all the related products showing only product which relates to this application alone.

Is there any other better Query Operator that can work in this scenario?

@aasanovic, can you please guide us?

Gravatar for

Comment by Sébastien Belzile, May 8, 2017 7:35 PM

Could you aerate your question? It is a real pain to understand.

0 Reply
Ask a question