We are using Azure Search Index for one of our Search API. We have a field in Azure Search Index say Display Name (which is a string field. The requirement is from the API when we do a search using the Display Name, the search should be an exact search against the fields.
Eg: If we search for "George Joseph", the Search Index should return only records that exactly match the Display Name as "George Joseph" and it should not return records with names - "George Joseph John" or John George Joseph"
Is there any way I can accomplish this?
Regards,
John
filter
instead of usingsearch
? So your search expression would be$filter=DisplaName%20eq%20'George Joseph'
. – Gaurav Mantri$filter=DisplayName%20eq%20'George Joseph'%20or%20DisplayName%20eq%20'George John'
. Please see this link for more details: docs.microsoft.com/en-us/rest/api/searchservice/…. Only catch is that the fields on which you're filtering must havefilterable
attribute set. – Gaurav Mantri