Automatic query refinement settings

edit

Automatic query refinement settings

edit

You can read more about automatic query refinement in the guide. Also, the API for changing the automatic query refinement is described in Content sources API reference.

Automatic query refinement allows query expansion - it is a domain-specific language extension to your query. For example, if you set up a phrase created by as an automatic query refinement phrase, and use created by some@person in your query, the query will automatically expand that into a filter created_by: some@person, provided that you also have a field called created_by and a facet set up for the created_by field.

This refinement also has a blocklist, which by default has some words that are not used in automatic query refinement. That means that these words don’t trigger query expansion and if used in a query, will always be applied as is.

Get automatic query refinement blocklist

edit

List words/phrases that are excluded from automatic query refinement.

GET <ENTERPRISE_SEARCH_BASE_URL>/api/ws/v1/automatic_query_refinement

Request example

edit
curl -X GET '<ENTERPRISE_SEARCH_BASE_URL>/api/ws/v1/automatic_query_refinement' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Accept: application/json' \

Response example

edit
{
  "blocklist" : [
    "it",
    "in",
    "notes",
    "note",
    "pages",
    "page",
    "strings",
    "string",
    "templates",
    "template"
  ]
}

Update automatic query refinement blocklist

edit

Update the list of words/phrases that are excluded from automatic query refinement.

PUT <ENTERPRISE_SEARCH_BASE_URL>/api/ws/v1/automatic_query_refinement
Content-Type: application/json

{
  "blocklist": [
    "some", "words", "here"
  ]
}

Request example

edit
curl -X PUT '<ENTERPRISE_SEARCH_BASE_URL>/api/ws/v1/automatic_query_refinement' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
  "blocklist": [
    "some",
    "words",
    "here"
  ]
}'

Response example

edit
{
  "blocklist": [
    "some",
    "words",
    "here"
  ]
}

Default automatic query refinement blocklist

edit

By default, we store the following list of words/phrases that are excluded from automatic query refinement.

{
  "blocklist": [
    "it",
    "in",
    "pages",
    "page",
    "notes",
    "note",
    "numbers",
    "number",
    "strings",
    "string",
    "templates",
    "template"
  ]
}