Only displaying linked entities as results

Hi all. Imagine the following scenario:

  • 2 Entity Types (Locations & Offers)
  • Sam’s Taco Bar Bournemouth is linked (via linked entity list field) to Offer 1
  • Both Locations and Offers have answers Verticals configured along with appropriate Pages/Cards
  • In the Answers Config, offer.name is set as a searchable field on the Location vertical.

Is it possible that if someone ran a search query such as: “Offers in Bournemouth” or “Offers at Sam’s Taco Bar Bournemouth” that only the linked offers (in this example, Offer 1) would appear in the search results, as opposed to all offers in the KG?

Thanks

Sam

Hi Sam,

Interesting use case! Since you’re looking to return offers, you’ll want to edit the offers instead of the locations:

  • Add a linked entity list field to Offer 1 with Sam’s Taco Bar Bournemouth linked
  • In the Answers Config, set location.name as a searchable field on the Offers vertical

This should surface Offer 1 if someone were to search “Offers at Sam’s Taco Bar Bournemouth”. Let us know if this works and if you get any more insights as you build this out!

Thanks for the reply Kristy. I followed your advice and that works, but I had to tweak the config a little further (see below).

I think the challenge I have is my entity type is also called “Offers” meaning that even following the points you advised previously, all offers still return in the search results (due to the Entity.Type NLP search parameter for that given vertical) - not just the linked offers.

So, unchecking the Entity.Type NLP filter from the Offer entity type does return the correct result (the location with just the linked offer returned), - it just means if a user types the single word “Offers” into the search box, the search config ignores that entity type.

For now, this is fine, but am curious to know any additional thoughts you may have on this,

Thanks again,

Sam

Hey Sam,

Good callout. Since we’d want offers to return for the query “offers” you’ll want to keep builtin.entityType as a searchable field still. It sounds like you need to make the search on location.name a bit stronger. Is it currently set as a textSearch?

If location names are all pretty different, you can set both location.name as an NLP filter. This would find the closest match and only surface that one possibility. However, if there could be similarities in name, say “Sam’s Taco Bar Poole” and “Turtlehead Tacos Bournemouth”, you may want to use phrase match instead.

Another idea if there is potentially overlap in names and cities, is to separate out the location into a different field to search on.

Hope that helps!

1 Like

Thanks for the response Kristy - what you suggested makes sense and I’ll look into it. Thanks again, Sam