Configuration when Facet Option matches Entity Name

Hello,

I’m working on an Answers experience for searching the employees of a company. The Knowledge Graph uses linked entities to represent Manager/Managee relationships between employees and I’ve created a facet for c_manager.name to make it searchable.

If I have an Employee entity named “John Smith” I’d like to support two types of searches:

  1. Something like “people managed by John Smith” to return John Smith’s direct reports
  2. “John Smith” to return John Smith himself.

I can make search type 1 work by making c_manager.name an NLP Filter, but then search type 2 returns only his reports and not John Smith himself.

I’m wondering if there’s a way to support both of these types of searches. I’ve thought about using query rules potentially but there are a lot of managers so I don’t want to hardcode a rule for each of them.

Thanks,
Ben

Hey @Ben_Haines - I would try using phraseMatch as the searchable field type for John Smith’s own entity name. Let me know if this fixes the issue.

For context, we recently rolled out new best practices for name searching. If you’re interested, please check out this post: Searching People’s Names

Best,
Sam

Thanks for sharing that post.

I’ve tried configuring first name and last name to use Phrase Match, and the full Name to use Text Search as that post recommends. I still see searches for “John Smith” match the NLP Filter and return his direct reports instead of himself after those updates.

Hi @Ben_Haines - I thought about this a bit more and believe the use case should be supported if you switch the c_manager.name from NLP Filter to Text Search. That way, the tokens in the query will still be eligible to match to John Smith himself rather than just his direct reports. Let us know if this works.

I would recommend adding “Manager: John Smith” on the direct report employee cards to minimize confusion and help the user understand why the results are returning the query.

Best,
Sam

I tried switching c_manager.name from NLP Filter to Text Search, but now I’m not able to do search type 1. I haven’t been able to come up with a query that returns a manager’s reports, everything I’ve tried returns the manager themselves instead.

Marking that suggestion as the solution. It does allow me to search for reports by their manager’s name, I was confused above because there are also some other entities returned that just have similar names.

Hi @Ben_Haines glad this is closer to the desired behavior. If helpful, I walked through this topic on office hours today (recording below):

Best,
Sam