Gravatar for mukesh_kumar@bmc.com

Question by mukeshietk, Mar 10, 2016 11:49 AM

How to Implement Coveo Partial Match within JS Framework

Hi,

We are using JS Framework in our CMS (Clickability) system to embed Coveo Search Box. We want to implement Partial Match on this Coveo Search Box. Where can I find guideline and steps to write the script to enable Partial Match functionality? After doing some research I am able and know functionally what needs to be done but not sure, how and where to write JS script.

I found following references with the actual values we want to implement.

  enablePartialMatch: Coveo.ComponentOptions.buildBooleanOption({ defaultValue: false }),
  partialMatchKeywords: Coveo.ComponentOptions.buildNumberOption({ defaultValue: 4, min: 1 }),
  partialMatchThreshold: Coveo.ComponentOptions.buildStringOption({ defaultValue: '50%' }),
})
1 Reply
Gravatar for atheriault2@coveo.com

Answer by atheriault2, Mar 10, 2016 1:57 PM

To enable partial match you simply have to add data-enable-partial-math="true" to your HTML like so : <input id="mySearchBox" class="CoveoQueryBox" data-enable-partial-math="true"></input> https://developers.coveo.com/display/JsSearchV1/Querybox+Component#QueryboxComponent-enablePartialMatch

You can refer to our developer documentation to find a list of all the available options along with code examples. https://developers.coveo.com/display/JsSearchV1/JavaScript+Search+Framework+V1+Home

Ask a question