This article outlines how to troubleshoot issues with the search backend related to inferred Filters.
Be sure to follow the How to Start Debugging Backend Search Issues help article for general troubleshooting steps first. Once you resolve your issue, you may skip the remaining steps.
- Open the search log for the query you’re seeing issues for. Either:
- Navigate to Search > [[Experience Name]] > Test Search or a Configuration sub-tab. Run a test search and then select Debug Query from the drop-down menu.
- If you’ve already run the search in a staging or production link, navigate to Search > [[Experience Name]] > Search Logs and click on the relevant search log. Use the search bar or filters to help you find the correct search log or run the search again to have it appear at the top.
- Review which, if any, inferred filters were applied for each vertical in the search log. If inferred Filters are applied to fields that should not have it enabled, follow step 5 to disable it.
- Check the tokens the search is comprised of: The tokens of the query will impact what inferred filter is applied. This is shown in the search factors box on the right side of the search log.
- If the inferred filter value is not included as a search token, it is considered a stop word; it does not get evaluated as a query token and therefore no inferred Filter is applied. For example,
state == 'IN'
would not trigger an inferred filter. - Check the number of matching tokens between the query and the desired inferred filter field value: For a field value with a single token, the query must match that one token for the inferred filter to be applied. For field values with more than two tokens, the query must have at least two token matches.
- If there are multiple matches on an inferred filter field value with two or more tokens, the best match is determined by the highest percentage of tokens that are a match. Given a query “blue cross” and candidate filters “blue cross” and “blue cross blue shield” for the “Insurance” field, the inferred filter will be applied on “blue cross” because 2/2 tokens match, as opposed to 2/4 for “blue cross blue shield”.
- If the inferred filter value is not included as a search token, it is considered a stop word; it does not get evaluated as a query token and therefore no inferred Filter is applied. For example,
- Confirm inferred Filters are configured properly: Make sure only fields you want inferred filters to be applied on have it enabled. Check what is configured by:
- Navigate to Search > [[Experience Name]] > Verticals.
- Select the relevant vertical and click on the Filters tab.
- Confirm the appropriate fields are selected and the appropriate fields have inferred filter checked off.
- To add or remove fields, click + Add / Update Fields in the top right. Check or uncheck the desired fields and click Update.
- To add or remove a field as an inferred filter, check or uncheck the box in the inferred Filter column.
- Check for experience training overrides: The desired inferred filter will not show up if it was rejected or another inferred filter was approved for the same search query.
- Navigate to Search > [[Experience Name]] > Inferred Filters (under Training).
- Use the search bar to filter to the search term you are troubleshooting.
- Click to turn on the toggle for “Show completed”.
- Check to see if there are any inferred filter entries for the relevant vertical.
- If the desired inferred filter was rejected for the relevant vertical, this inferred filter would not be applied for this search query. If you would like it to apply, undo the completed experience training override.
- If a different inferred filter was approved, the desired inferred filter will not be applied.
- Undo the incorrect filter.
- Toggle “Show completed” off.
- Approve the desired result by clicking the green checkmark next to it.
- If there are multiple active overrides, undo undesired ones so that there is only one active override.
- Check the Troubleshooting Experience Training Overrides]help article for more guidance.
- Check the inferred filter order: In situations where there are two candidate inferred Filters with identical values, set an inferred filter order to act as the tiebreaker.
-
- Navigate to Search > [[Experience Name]] > Edit as JSON.
- Edit or add the
nlpFilterOrder
property for the relevant vertical in the following format:"verticals": {
"facilities": {
"entityTypes": [
"healthcareFacility"
],
"name": "Facilities",
"nlpFilterOrder": [
"specialties",
"builtinFile.medicalConditions"
],
"searchableFields": {
"builtinFile.medicalConditions": {
"nlpFilter": true
},
"specialties": {
"nlpFilter": true
},
},
"source": "KNOWLEDGE_MANAGER"
}
}
-
Comments
0 comments
Article is closed for comments.