> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Head/tail analysis

[localhost link]: http://localhost:3000/docs/lucidworks-search/07-improve-your-queries/head-tail-analysis/overview

[mintlify link]: https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/head-tail-analysis/overview.md

[old doc.lw link]: https://doc.lucidworks.com/managed-fusion/5.9/a024os.md

Head/tail analysis is:

* Also known as the Underperforming Query Rewriting feature
* Uses signals data to identify underperforming queries
* Suggests improved queries that could produce better conversion rates

> [!NOTE]
>
> This feature is deprecated in Lucidworks Search 5.9.15 and will be removed in a future release.
> Lucidworks recommends migrating to [Neural Hybrid Search](https://doc.lucidworks.com/docs/lucidworks-search/11-vector-search/overview.md), which achieves superior relevance compared to legacy machine learning methods.

When an incoming query contains a matching underperforming query, the original query is replaced by an improved query.
These improvements can be:

* Suggested by the [Head/Tail Analysis Spark job](https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/head-tail-analysis.md) operating on your signals data
* Created manually using the [Rules Editor](https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/rules-editor/overview.md) or underlying API

Query improvements are applied in the [Text Tagger stage](https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/query-pipeline-stages/text-tagger.md) of the query pipeline.

The [Head/Tail Analysis job](https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/head-tail-analysis.md) automatically creates query improvements based on your AI-generated data. When you navigate to **Relevance** > **Rules** > **Rewrite** and select the **Head/Tail** tab, the application displays the **Underperforming Query Rewriting** screen.

> [!NOTE]
>
> Job-generated query improvements are always assigned an initial status of "Pending", never "Auto". Query improvements must be explicitly approved and published in order to be copied to the `COLLECTION_NAME_query_rewrite` collection.

![Underperforming Queries screen](https://mintcdn.com/lucidworks/1FfsxYVDR4XL56q9/assets/images/5.1/ai-rules/ui/rules-ui-rewrite-headtail.png?fit=max\&auto=format\&n=1FfsxYVDR4XL56q9\&q=85\&s=78d3e73ec9db7d8284531604720a5967)

> [card] [Query Analytics](https://academy.lucidworks.com/query-analytics)
>
> The course for **Query Analytics** focuses on how Fusion provides query analytics to detect and improve underperforming queries.

> [card] Key questions to get you started
>
> Powered by Lucidworks Agent Studio

## Reviewing auto-generated query improvements

Query improvements that are automatically generated by the [Head/Tail Analysis job](https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/head-tail-analysis.md) are assigned the following status value:

* **Auto**
  All results will be automatically deployed to the `_query_rewrite` collection.\
  No action is required on these results, but you can edit them if you wish.

## Adding new query improvements

You can manually add query improvements in addition to any generated by the [Head/Tail Analysis job](https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/head-tail-analysis.md).

### How to add a query improvement

1. Navigate to **Relevance** > **Rules** > **Rewrite**.
2. Select the **Head/Tail** tab. The application displays the **Underperforming Query Rewriting** screen.
3. At the bottom of the rules list, click the ![](https://doc.lucidworks.com/assets/images/4.2/icons/add-rule.png) icon.\
   A new query improvement appears at the top of the list:

   ![Add a query improvement](https://mintcdn.com/lucidworks/tklssWuUmNaxlF0b/assets/images/5.4/add-head-tail-query.png?fit=max\&auto=format\&n=tklssWuUmNaxlF0b\&q=85\&s=501c1c5a7ddbb317b62ff5222a1739a6)
4. Enter the underperforming query.
5. Enter one or more query improvements.

> [!TIP]
>
> It is not necessary to set a confidence value.

6. Select the query improvement’s status, depending on whether you want to deploy it the next time you publish your changes ("Approved") or save it for further review ("Pending").
7. Click the check mark to save the new query improvement.

## Publishing your changes

### How to publish updated query improvements

1. In the **Underperforming Query Rewriting** screen, click the **PUBLISH** button.\
   Lucidworks Search prompts you to confirm that you want to publish your changes.
2. Click **PUBLISH**.

> [!TIP]
>
> You can un-publish a query rewrite by changing its status to "denied", then clicking **PUBLISH**.

For more information about how to use underperforming query rewrites in the [Rules Editor](https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/rules-editor/overview.md), see **Use query rewrites in the Rules Editor**.

> [accordion] Use query rewrites in the Rules Editor
>
> This article describes how to use the Rewrites screen in the [Rules Editor](https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/rules-editor/overview.md).
>
> ## Query rewrite rule types
>
> * **Head/Tail.** Replace underperforming queries with queries that produce higher click-through rates. Query improvements always require review before they are published. Schedule the Head/Tail Analysis job to get AI-generated query improvements based on your signals collection. \
>   \
>   Manually created Head/Tail rewrites must provide an "Improved Query" in a format appropriate to the type of request the rewrite will be applied to. For Legacy requests, this means a valid Solr query fit for use as the `q` parameter. For DSL requests this means a JSON string representing the main DSL query. \
>   \
>   For more information, see:
>   * [Underperforming Query Rewriting](https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/head-tail-analysis/overview.md)
>   * [Head/Tail Analysis Jobs](https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/head-tail-analysis.md)
> * **Misspelling.** Lucidworks Search replaces misspelled query terms with their spelling corrections for better search results. Schedule the Token and Phrase Spell Correction job to get AI-generated spelling corrections based on your signals collection. See [Misspelling Detection](https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/misspelling-detection/overview.md).
> * **Phrase.** Known phrases are boosted when they appear in new queries. Schedule the Phrase Extraction job to get AI-generated phrases based on your signals collection. For more information, see [Phrase Detection](https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/phrase-detection/overview.md).
> * **Synonym.** Synonyms are used to expand queries so that they include all known synonyms of the query terms. To retrieve AI-generated synonyms based on your signals collection, schedule the [Synonym Detection job](https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/synonym-detection.md).
> * **Remove Words** - Remove particular phrases from queries. Unlike other rewrites, these should be entered manually and are not generated by a job. See [Remove Words](https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/remove-words/overview.md).
>
> ## Facets
>
> ### Facet menu
>
> ![Facet rules](https://mintcdn.com/lucidworks/L5PMnIeZ03zhv8Ti/assets/images/5.6/facet-menu.png?fit=max\&auto=format\&n=L5PMnIeZ03zhv8Ti\&q=85\&s=7a220e907feef17ff297b2e8879131ed)
>
> To facet the rules list by **Status** or **Published**, click one of the facet items within the facet categories.
>
> To facet the rules by **Confidence**, click and drag either slider to set the range of confidence you would like to see:
>
> ![Confidence facet](https://mintcdn.com/lucidworks/1FfsxYVDR4XL56q9/assets/images/5.1/ai-rules/rules-facet-confidence.png?fit=max\&auto=format\&n=1FfsxYVDR4XL56q9\&q=85\&s=52f5364289ced44dda00fa72975c48fa)
>
> > [!NOTE]
> >
> > Faceting rules by confidence is not available for Head/Tail rewrites.
>
> ### Search
>
> Enter a term in the search bar to quickly facet your query rewrite rules.
>
> ## Rules
>
> Begin by selecting a query rewrite rule types to create.
>
> ![Query rewrite rule types](https://mintcdn.com/lucidworks/1FfsxYVDR4XL56q9/assets/images/5.1/ai-rules/rewrite-rule-types.png?fit=max\&auto=format\&n=1FfsxYVDR4XL56q9\&q=85\&s=a1ca6d61e701b98db2946c3762b99502)
>
> ### Create a rule
>
> 1. Click **+Add**.
> 2. In the new table row, complete the required fields, and additional fields as needed.
> 3. Click the checkmark to save, or close to cancel the changes.
>
> ### Edit a rule
>
> 1. Hold the pointer over the rule to edit.
> 2. Click the pencil icon.
> 3. Enter desired changes and click the checkmark to save, or close to cancel the changes.
>
> ### Approve/deny rules
>
> 1. Hold the pointer over a rule.
> 2. Select the checkbox that displays for that rule.
> 3. To modify multiple rules, hold the pointer over each rule and select its corresponding checkbox.
> 4. Click **Approve** or **Deny** as needed.
>
> ### Publish a rule
>
> 1. Hold the pointer over a rule.
> 2. Select the checkbox that displays for that rule.
> 3. To publish multiple rules, hold the pointer over each rule and select its corresponding checkbox.
> 4. Click **Publish Selected** to publish the selected rules.
>
> #### Publish an individual rule
>
> 1. Hold the pointer over a rule.
> 2. Click the ![Publish individual button](https://doc.lucidworks.com/assets/images/5.1/ai-rules/buttons/publish-individual-button.png) button.
> 3. To confirm, click **Publish**.
>
> ### Delete rules
>
> #### Delete a single rule
>
> 1. Hold the pointer over a rule.
> 2. Click the trash can.
> 3. To confirm, click **Delete**.
>
> #### Delete multiple rules
>
> 1. Hold the pointer over a rule.
> 2. Select the checkbox that displays for that rule.
> 3. To delete multiple rules, hold the pointer over each rule and select its corresponding checkbox.
> 4. Click **Delete**.
> 5. To confirm, click **Delete** again.
>
> ### Sort rules
>
> 1. Hold the pointer over column titles. A ![Arrow down icon](https://doc.lucidworks.com/assets/images/5.1/ai-rules/icons/arrow-down-icon.png) icon displays for some titles to indicate the rules list can be sorted by that column.
>
> 2. Click the title column to sort the rules.
>
> > [!NOTE]
> >
> > The column that is currently sorting the rules list is indicated by an ![Arrow down icon](https://doc.lucidworks.com/assets/images/5.1/ai-rules/icons/arrow-down-icon.png) or ![Arrow up icon](https://doc.lucidworks.com/assets/images/5.1/ai-rules/icons/arrow-up-icon.png) icon.
>
> ### Export rules
>
> To export the rules list, click **Export**. This generates a `.csv` file that contains your rules.
>
> ## Columns
>
> ### Customize columns
>
> To customize columns:
>
> 1. Hold the pointer over the row of column titles.
> 2. Click the ![Config button](https://doc.lucidworks.com/assets/images/5.1/ai-rules/buttons/config-button.png)  button.
>
>    ![Customize Columns to Display](https://mintcdn.com/lucidworks/TTnHmbCCHl-1HFoG/assets/images/5.1/ai-rules/customize-columns-qr.png?fit=max\&auto=format\&n=TTnHmbCCHl-1HFoG\&q=85\&s=ceadfee78e65c421d365622724ab20f7)
> 3. In the Customize Columns to Display screen, select the checkboxes for the columns you want to display. Clear the checkboxes for columns you do not want to display.
> 4. Click **Save**. To exit without saving your changes, click **Cancel**.

## Query rewrite jobs post-processing cleanup

To perform more extensive cleanup of query rewrites, complete the procedures in **Query rewrite jobs post-processing cleanup**.

> [accordion] Query rewrite jobs post-processing cleanup
>
> > [!CAUTION]
> >
> > The Synonym Detection job uses the output of the Misspelling Detection job and Phrase Extraction job.  Therefore, post processing *must* occur in the order specified in this topic for the [Synonym detection job cleanup](#synonym-detection-job-cleanup), [Phrase extraction job cleanup](#phrase-extraction-job-cleanup), and [Misspelling detection job cleanup](#misspelling-detection-job-cleanup) procedures.  The [Head-Tail Analysis job cleanup](#head-tail-analysis-job-cleanup) can occur in any order.
>
> ## Synonym detection job cleanup
>
> Use this job to remove low confidence synonyms.
>
> ### Prerequisites
>
> Complete this:
>
> * **AFTER** the Misspelling Detection and Phrase Extraction jobs have successfully completed.
> * **BEFORE** removing low confidence synonym suggestions generated in the *post processing* phrase extraction cleanup and misspelling detection cleanup procedures detailed later in this topic.
>
> ### Remove low confidence synonym suggestions
>
> Use either a [Synonym cleanup method 1 - API call](#synonym-cleanup-method-1-api-call) or the [Synonym cleanup method 2 - Lucidworks Search Admin UI](#synonym-cleanup-method-2-managed-fusion-admin-ui) to remove low confidence synonym suggestions.
>
> #### Synonym cleanup method 1 - API call
>
> 1. Open the `delete_lowConf_synonyms.json` file.
>    ```json theme={"dark"}
>    {
>        "type" : "rest-call",
>        "id" : "DC_Large_QR_DELETE_LOW_CONFIDENCE_SYNONYMS",
>        "callParams" : {
>        "uri" : "solr://DC_Large_query_rewrite_staging/update",
>        "method" : "post",
>        "queryParams" : {
>            "wt" : "json"
>        },
>        "headers" : { },
>        "entity" : "<root><delete><query>type:synonym AND confidence:[0 TO 0.0005]</query></delete><commit/></root>"
>        },
>        "type" : "rest-call",
>        "type" : "rest-call"
>    }
>    ```
>    > [!NOTE]
>    >
>    > **REQUEST ENTITY** specifies the threshold for low confidence synonyms. Edit the upper range from 0.0005 to increase or decrease the threshold based on your data.
> 2. Enter `<your query_rewrite_staging collection name/update>` in the **uri** field. An example URI value for an app called `DC_Large` would be `DC_Large_query_rewrite_staging/update`.
> 3. Change the `id` field if applicable.
> 4. Specify the **upper confidence level** in the **entity** field.
>    \[!NOTE] The **entity** field specifies the threshold for low confidence synonyms. Edit the upper range to increase or decrease the threshold based on your data.
>
> #### Synonym cleanup method 2 - Lucidworks Search Admin UI
>
> 1. Log in to Lucidworks Search and select **Collections > Jobs**.
> 2. Select **Add+ > Custom and Other Jobs > REST Call**.
> 3. Enter **delete-low-confidence-synonyms** in the **ID** field.
> 4. Enter `<your query_rewrite_staging collection name/update>` in the **ENDPOINT URI** field. An example URI value for an app called `DC_Large` would be `DC_Large_query_rewrite_staging/update`.
> 5. Enter **POST** in the **CALL METHOD** field.
> 6. In the **QUERY PARAMETERS** section, select **+** to add a property.
> 7. Enter **wt** in the **Property Name** field.
> 8. Enter **json** in the **Property Value** field.
> 9. In the **REQUEST PROTOCOL HEADERS** section, select **+** to add a property.
> 10. Enter the following as a **REQUEST ENTITY (AS STRING)**
>
>     `<root><delete><query>type:synonym AND confidence: [0 TO 0.0005]</query></delete><commit/></root>`
>
>     > [!NOTE]
>     >
>     > **REQUEST ENTITY** specifies the threshold for low confidence synonyms. Edit the upper range from 0.0005 to increase or decrease the threshold based on your data.
>
> ### Delete all synonym suggestions
>
> To delete *all* of the synonym suggestions, enter the following in the **REQUEST ENTITY** section:
>
> `<root><delete><query>type:synonym</query></delete><commit/></root>`
>
> > [!NOTE]
> >
> > This entry may be helpful when tuning the synonym detection job and testing different configuration parameters.
>
> ## Phrase extraction job cleanup
>
> Use this job to remove low confidence phrase suggestions.
>
> ### Prerequisites
>
> Complete this:
>
> * **AFTER** you complete [Synonym detection job cleanup](#synonym-detection-job-cleanup)
>
> ### Remove low confidence phrase suggestions
>
> Use either a [Phrase cleanup method 1 - API call](#phrase-cleanup-method-1-api-call) or the [Phrase cleanup method 2 - Lucidworks Search Admin UI](#phrase-cleanup-method-2-managed-fusion-admin-ui) to remove low confidence phrase suggestions.
>
> #### Phrase cleanup method 1 - API call
>
> 1. Open the `delete_lowConf_phrases.json` file.
>
> ```json theme={"dark"}
>     {
>     "type" : "rest-call",
>     "id" : "DC_Large_QR_DELETE_LOW_CONFIDENCE_PHRASES",
>     "callParams" : {
>         "uri" : "solr://DC_Large_query_rewrite_staging/update",
>         "method" : "post",
>         "queryParams" : {
>         "wt" : "json"
>         },
>         "headers" : { },
>         "entity" : " <root><delete><query>type:phrase AND confidence:[0 TO <INSERT VALUE HERE>]</query></delete><commit/></root>"
>     },
>     "type" : "rest-call",
>     "type" : "rest-call"
>     }
> ```
>
> 2. Enter `<your query_rewrite_staging collection name/update>` in the **uri** field. An example URI value for an app called `DC_Large` would be `DC_Large_query_rewrite_staging/update`.
> 3. Change the **id** field if applicable.
> 4. Specify the **upper confidence level** in the **entity** field.
>
>    > [!NOTE]
>    >
>    > The **entity** field specifies the threshold for low confidence phrases. Edit the upper range to increase or decrease the threshold based on your data.
>
> #### Phrase cleanup method 2 - Lucidworks Search Admin UI
>
> 1. Log in to Lucidworks Search and select **Collections > Jobs**.
> 2. Select **Add+ > Custom and Other Jobs > REST Call**.
> 3. Enter **remove-low-confidence-phrases** in the **ID** field.
> 4. Enter `<your query_rewrite_staging collection name/update>` in the **ENDPOINT URI** field. An example URI value for an app called `DC_Large` would be `DC_Large_query_rewrite_staging/update`.
> 5. Enter **POST** in the **CALL METHOD** field.
> 6. In the **QUERY PARAMETERS** section, select **+** to add a property.
> 7. Enter **wt** in the **Property Name** field.
> 8. Enter **json** in the **Property Value** field.
> 9. In the **REQUEST PROTOCOL HEADERS** section, select **+** to add a property.
> 10. Enter the following as a **REQUEST ENTITY (AS STRING)**
>
>     `<root><delete><query>type:phrase AND confidence: [0 TO <insert value>]</query></delete><commit/></root>`
>
>     > [!NOTE]
>     >
>     > **REQUEST ENTITY** specifies the threshold for low confidence phrases. Edit the upper range to increase or decrease the threshold based on your data.
>
> ### Delete all phrase suggestions
>
> To delete *all* of the phrase suggestions, enter the following in the **REQUEST ENTITY** section:
>
> `<root><delete><query>type:phrase</query></delete><commit/></root>`
>
> > [!NOTE]
> >
> > This entry may be helpful when tuning the phrase extraction job and testing different configuration parameters.
>
> ## Misspelling detection job cleanup
>
> Use this job to remove low confidence spellings (also referred to as misspellings).
>
> ### Prerequisites
>
> Complete this:
>
> * **AFTER** you complete [Synonym detection job cleanup](#synonym-detection-job-cleanup) and [Phrase extraction job cleanup](#phrase-extraction-job-cleanup)
>
> ### Remove misspelling suggestions
>
> Use either a [Misspelling cleanup method 1 - API call](#misspelling-cleanup-method-1-api-call) or the [Misspelling cleanup method 2 - Lucidworks Search Admin UI](#misspelling-cleanup-method-2-managed-fusion-admin-ui) to remove misspelling suggestions.
>
> #### Misspelling cleanup method 1 - API call
>
> 1. Open the `delete_lowConf_misspellings.json` file.
>    ```json theme={"dark"}
>    {
>    "type" : "rest-call",
>    "id" : "DC_Large_QR_DELETE_LOW_CONFIDENCE_MISSPELLINGS",
>    "callParams" : {
>        "uri" : "solr://DC_Large_query_rewrite_staging",
>        "method" : "post",
>        "queryParams" : {
>        "wt" : "json"
>        },
>        "headers" : { },
>        "entity" : "<root><delete><query>type:spell AND confidence:[0 TO 0.5]</query></delete><commit/></root>"
>    },
>    "type" : "rest-call",
>    "type" : "rest-call"
>    }
>    ```
> 2. Enter `<your query_rewrite_staging collection name/update>` in the **uri** field. An example URI value for an app called `DC_Large` would be `DC_Large_query_rewrite_staging/update`.
> 3. Change the **id** field if applicable.
> 4. Specify the **upper confidence level** in the **entity** field.
>
>    > [!NOTE]
>    >
>    > The **entity** field specifies the threshold for low confidence spellings. Edit the upper range to increase or decrease the threshold based on your data.
>
> #### Misspelling cleanup method 2 - Lucidworks Search Admin UI
>
> 1. Log in to Lucidworks Search and select **Collections > Jobs**.
> 2. Select **Add+ > Custom and Other Jobs > REST Call**.
> 3. Enter **remove-low-confidence-spellings** in the **ID** field.
> 4. Enter `<your query_rewrite_staging collection name/update>` in the **ENDPOINT URI** field. An example URI value for an app called `DC_Large` would be `DC_Large_query_rewrite_staging/update`.
> 5. Enter **POST** in the **CALL METHOD** field.
> 6. In the **QUERY PARAMETERS** section, select **+** to add a property.
> 7. Enter **wt** in the **Property Name** field.
> 8. Enter **json** in the **Property Value** field.
> 9. In the **REQUEST PROTOCOL HEADERS** section, select **+** to add a property.
> 10. Enter the following as a **REQUEST ENTITY (AS STRING)**
>
>     `<root><delete><query>type:spell AND confidence: [0 TO 0.5]</query></delete><commit/></root>`
>
>     > [!NOTE]
>     >
>     > **REQUEST ENTITY** specifies the threshold for low confidence spellings. Edit the upper range from 0.5 to increase or decrease the threshold based on your data.
>
> ### Delete all misspelling suggestions
>
> To delete *all* of the misspelling suggestions, enter the following in the **REQUEST ENTITY** section:
>
> `<root><delete><query>type:spell</query></delete><commit/></root>`
>
> > [!NOTE]
> >
> > This entry may be helpful when tuning the misspelling detection job and testing different configuration parameters.
>
> ## Head-tail analysis job cleanup
>
> The head-tail analysis job puts tail queries into one of multiple reason categories. For example, a tail query that includes a number might be assigned to the 'numbers' reason category. If the output in a particular category is not useful, you can remove it from the results. The examples in this section remove the numbers category.
>
> ### Prerequisites
>
> The head-tail analysis job cleanup does *not* have to occur in a specific order.
>
> ### Remove head-tail analysis query suggestions
>
> Use either a [Head-tail analysis cleanup method 1 - API call](#head-tail-analysis-cleanup-method-1-api-call) or the [Head-tail analysis cleanup method 2 - Lucidworks Search Admin UI](#head-tail-analysis-cleanup-method-2-managed-fusion-admin-ui) to remove query category suggestions.
>
> #### Head-tail analysis cleanup method 1 - API call
>
> 1. Open the `delete_lowConf_headTail.json` file.
>    ```json theme={"dark"}
>    {
>    "type" : "rest-call",
>    "id" : "DC_Large_QR_HEAD_TAIL_CLEANUP",
>    "callParams" : {
>        "uri" : "solr://DC_Large_query_rewrite_staging/update",
>        "method" : "post",
>        "queryParams" : {
>        "wt" : "json"
>        },
>        "headers" : { },
>        "entity" : "<root><delete><query>reason_code_s:(\"number\" \"number spelling\" \"number rare-term\" \"question number other-specific\" \"number others\" \"number other-specific\" \"number other-extra\" \"product number other-specific\" \"product number other-extra\" \"product number spelling\" \"product number others\" \"product number rare-term\" \"product question number\" \"product number re-wording\" \"question number other-extra\" \"number re-wording\")</query></delete><commit/></root>"
>    },
>    "type" : "rest-call",
>    "type" : "rest-call"
>    }
>    ```
> 2. Enter `<your query_rewrite_staging collection name/update>` in the **uri** field. An example URI value for an app called `DC_Large` would be `DC_Large_query_rewrite_staging/update`.
> 3. Change the **id** field if applicable.
>
> #### Head-tail analysis cleanup method 2 - Lucidworks Search Admin UI
>
> 1. Log in to Lucidworks Search and select **Collections > Jobs**.
> 2. Select **Add+ > Custom and Other Jobs > REST Call**.
> 3. Enter **remove-low-confidence-head-tail** in the **ID** field.
> 4. Enter `<your query_rewrite_staging collection name/update>` in the **ENDPOINT URI** field. An example URI value for an app called `DC_Large` would be `DC_Large_query_rewrite_staging/update`.
> 5. Enter **POST** in the **CALL METHOD** field.
> 6. In the **QUERY PARAMETERS** section, select **+** to add a property.
> 7. Enter **wt** in the **Property Name** field.
> 8. Enter **json** in the **Property Value** field.
> 9. In the **REQUEST PROTOCOL HEADERS** section, select **+** to add a property.
> 10. Enter the following as a **REQUEST ENTITY (AS STRING)**
>     ```
>     <root><delete><query>reason_code_s:("number" "number spelling" "number rare-term" "question number other-specific" "number others" "number other-specific" "number other-extra" "product number other-specific" "product number other-extra" "product number spelling" "product number others" "product number rare-term" "product question number" "product number re-wording" "question number other-extra" "number re-wording")</query></delete><commit/></root>
>     ```
>
> ### Delete all head-tail suggestions
>
> To delete *all* of the head-tail suggestions, enter the following in the **REQUEST ENTITY** section:
>
> `<root><delete><query>type:tail</query></delete><commit/></root>`
>
> > [!NOTE]
> >
> > This entry may be helpful when tuning the head-tail job and testing different configuration parameters.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.