Automatic query refinement settingsedit

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 blocklistedit

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

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

Request exampleedit

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

Response exampleedit

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

Update automatic query refinement blocklistedit

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 exampleedit

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 exampleedit

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

Default automatic query refinement blocklistedit

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"
  ]
}