BoxQuerySome component
BoxQuerySome component
The BoxQuerySome
component is used to automatically include Salesforce fields to the query of a Coveo Insight Panel Classic Component.
By default, the fields are included in the advanced query (see Advanced expression).
This component is included in the default Coveo Insight Panel Classic Component to include the case subject.
Options
include
A comma separated list of fields to automatically add to the query.
The default value is Subject
.
<div data-include="<FIELD1>, <FIELD2>, <FIELD3>"></div>
Where you can replace <FIELD1>
, <FIELD2>
, and <FIELD3>
by respectively the name of the first, second, and third field you want to add to the query.
You can add as many fields as you want.
includeCurrentRecord
Specifies whether to include the currently viewed case in the search results.
The default value is false
.
<div data-include-current-record="false"></div>
disableOnNonContextualSearch
Specifies whether to disable the added query when a user decides to perform a non-contextual search (see allowNonContextualSearch).
The default value is true
.
<div data-disable-on-non-contextual-search="true"></div>
useSomeQRE
Specifies whether to generate the query using the $some
query extension.
Setting this option to false
changes the query from an aq
to an lq
(see Large expression), enabling Coveo Machine Learning Intelligent Term Detection (ITD).
The default value is true
.
<div data-use-some-q-r-e="true"></div>
When this value is true, you can use the arguments of the $some
expression.
To use them, add data-
before the argument name, and replace every capital letter with a dash followed by its lowercase equivalent.
For example, removeStopWords
becomes data-remove-stop-words
.
Important
The default value for The default value for The default value for The default value for |
Additionally, you can use the bindOnQuery
argument, which specifies whether the component should use the generated query to filter items.
Its default value is true
.
Methods
enable
Enables the component.
$('.CoveoBoxQuerySome').coveo('enable')
disable
Disables the component.
$('.CoveoBoxQuerySome').coveo('disable')
Usage
In your search page, add a div
with the CoveoBoxQuerySome
class.
<div class="CoveoBoxQuerySome" data-include="Subject">
</div>