How to always return specific vertical entities in the result

I would like to return location vertical for any queries. For every queries.

If the user query for lcoation related questions like “location near me” then I know the location vertical is returned.

If Answers algo decide to return location cards for a query, then it’s fine, I let Answers algo to return location vertical result.

If Answers algo decide to not return location card for a query, butbut I want to still display the location cards with “near me”.

For example, if the user search “how to reset password” which is FAQ related query and not related any location entities, then FAQ entities are returned on the top. But in addition, I want to location cards also displayed on the bottom.

How can I acchieve this?

Hi Takeshi -

Great question. There are a few ways to go about this but I would recommend taking a look at this Query Rules module here: Introduction to Query Rules | Hitchhikers

You can use the Regex criteria in a query rules to capture all queries and then decide which action you want to apply (e.g., Add Filter or Boost Entities)

Let us know if that helps or if you need more guidance!

Best,
Alyssa

Hi @Alyssa_Hubbard,

Thank you for your reply!! And I am sorry, but could you please tell me the way Boost Vertical? Not Boost specific entities. I would like to boost location vertical with “near me” .

Thanks,
Takeshi

Hi Takeshi,

Locations should be ranked highly for any search queries that include “near me” if builtin.location is set as an NLP filter. Since you want to show all locations for all queries, even those that don’t include “near me”, I would suggest boosting a saved filter you have for locations you want to surface. Check out the boost entity query rule unit for how to do this. For your criteria, you can use Regex as Alyssa mentioned, or you can also set it to searchTypes = UNIVERSAL since you want to apply it to all searches.

For more context, boosting a vertical would not work in this case because that just affects how verticals are ranked relative to each other. However, it does NOT affect which entities appear under each vertical. If you boost a vertical, but there are no relevant results for that vertical, it would still not show up. That’s why you must boost the entities themselves.