My Solr Index has two types of Users( Type-A and Type-B ), which can be identified with a field called as 'type'. But there is possibility for an user to have entries under both Types(A and B).
For example,
Jacob is a user who comes under both Types(A and B). So, he will have two documents in our Index like:
//document-1
name:...
type:A
age:...
//end of document-1
//document-2
name:...
Type:B
age:...
//end of document-2
My objective is,
When a user is searched and he is only of Type-A, he should be in the result.
When a user is searched and he is only of Type-B, he should be in the result.
- When a user(like Jacob) is searched and he is of both Type A and B, only document of Type-A should be in the result.
How could we achieve this through queries?
Thanks in advance!