Gravatar for

Question by, May 29, 2018 8:27 PM

Query building is not applied.

I have an issue with my code. Basically, the query filters are not applied to the results

<CoveoV2:JsSearch debug="true" searchHub="NewTroubleshootingInfo" filter="{!UserFilter}" additionalUserIdentities="{!AdditionalUserIdentities}" stylesheet="CoveoFullSearch.css">
    document.addEventListener('DOMContentLoaded', function () {
        var root = document.body;   
        Coveo.$$(root).on('buildingQuery', function(e, args) {
            var builder = new Coveo.QueryBuilder();
            builder.advancedExpression.addFieldExpression('@caddoctype', '==', ['Troubleshooting Info', 'Error Message', 'SKILL Information', 'Scripts']);
&lt;div class="CoveoResultList" data-layout="list" data-auto-select-fields-to-include="false"&gt;&lt;/div&gt;
1 Reply
Gravatar for

Answer by maveilleux, May 29, 2018 8:34 PM

Instead of creating a new querybuilder, did you try using the one in the `args`?

Something like, `args.queryBuilder.expression.add('innovus');`

Gravatar for

Comment by, May 29, 2018 8:39 PM

How can I add advancedExpression in the same way?



Ask a question