Phrase detection identifies phrases in your signals so that results with matching phrases can be boosted. This helps compensate for queries where phrases are not distinguished with quotation marks. For example, the query ipad case is rewritten as “ipad case”~10^2, meaning if ipad and case appear within 10 terms (whitespace-delimited tokens) of each other, then boost the result by a factor of 2. Phrases are applied in the Text Tagger stage of the query pipeline. Phrase detection screen For more information about how to use phrase detection in the Rules Editor, see:
  • Use query rewrites in the Rules Editor
  • Use phrase detection
This article describes how to use the Rewrites screen in the Rules Editor.

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:
  • Misspelling. Managed Fusion 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.
  • 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.
  • 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.
  • 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.

Facets

Facet menu

Facet rulesTo 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
Faceting rules by confidence is not available for Head/Tail rewrites.
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

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 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 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.
The column that is currently sorting the rules list is indicated by an Arrow down icon or Arrow up icon 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 button. Customize Columns to Display
  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.
The Phrase Extraction job automatically creates phrases based on your AI-generated data. When you navigate to Relevance > Rules > Rewrite and select the Phrase tab, the application displays the Phrase Detection screen.
When you manually add new phrases, subsequent job runs use those documents as input for machine learning to improve the job’s output. Unlike job-generated documents, manually-added query rewriting documents are never overwritten by new job output.
Phrase Detection screen
LucidAcademyLucidworks offers free training to help you get started.The Course for Query Analytics focuses on how Fusion provides query analytics to detect and improve underperforming queries:
Query AnalyticsPlay Button
Visit the LucidAcademy to see the full training catalog.

Reviewing auto-generated phrases

Phrases that are automatically generated by the Phrase Extraction job are assigned one of the following status values:
  • Auto These results have a confidence level as a threshold to automatically deploy them to the _query_rewrite collection. This threshold can be specified in the configuration parameter Minimum Likelihood Score (default value 0.1). No action is required on these results, but you can edit them if you wish.
  • Pending The confidence level is ambiguous, and the result must be reviewed by a user before it can be deployed. It will only be moved from the _query_rewrite_staging collection to the _query_rewrite collection when its status has changed to “Approved” and it has been published.

How to review a pending phrase result

  1. Navigate to Relevance > Rules > Rewrite.
  2. Select Phrase tab. The application displays the Phrase Detection screen.
    Notice the Status facet on the left. Click Pending to view only the items that need review.
  3. Click the Edit icon icon next to the phrase.
  4. In the Status column, select either “Approved” or “Denied”. Optionally, you can also edit the phrase itself.
    Although the Confidence field is also editable, changing its value makes no difference.
  5. Click the Close icon next to the updated phrase: Close a phrase
Approving a phrase does not automatically deploy it to the _query_rewrite collection. When you have finished your review, you must click Publish to deploy your changes.

Adding new phrases

You can manually add phrases in addition to any generated by the Phrase Extraction job.

How to add a phrase

  1. Navigate to Relevance > Rules > Rewrite.
  2. Select Phrase tab. The application displays the Phrase Detection screen.
  3. At the bottom of the rules list, click the Add icon icon. A new phrase appears at the top of the list.
  4. Enter the phrase.
    It is not necessary to set a confidence value.
  5. Select the phrase’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”).
  6. Click the check mark to save the new phrase.

Publishing your changes

How to publish updated phrases

  1. In the Phrase Detection screen, click the PUBLISH button. Managed Fusion prompts you to confirm that you want to publish your changes.
  2. Click PUBLISH.
You can un-publish a query rewrite by changing its status to “denied”, then clicking PUBLISH.
LucidAcademyLucidworks offers free training to help you get started.The Course for Query Analytics focuses on how Fusion provides query analytics to detect and improve underperforming queries:
Query AnalyticsPlay Button
Visit the LucidAcademy to see the full training catalog.