How to do Wildcard search using Azure AI Search or SQL like operator type behavior using Azure AI Search

Aravind Nandakumar 0 Reputation points
2024-03-30T05:11:33.65+00:00

The Scenario
I have a scenario where I need to search for e-mail id or url like sample.name@example.com or https://sample.website.com/en-us so basically for something that contains special characters like (.[dot] -[hyphen] @[at symbol] '[single-quotes] "[double-quotes] :[colon] ;[semi:colon] ([paranthesis] {[curly-braces] ) along with text.

Problem
We are not able to search like wildcard or we are not able to achieve the SQL like operator kind of behavior using the Azure AI Search.
For example,

For e-mail
sample.name@example.c
mple.name@example.com
name@example.
e.name@ex

I expect all the above search requests to give me documents whose email field value is sample.name@example.com.

For url
https://sample.website.com/en
https://sample.website.com/
ps://sample.website.com/e
://sample.website.c

I expect all the above search requests to give me documents whose website field value is https://sample.website.com/en-us.

Requirement

  1. What are the ways to achieve this?
  2. What settings do we need to create the index to achieve this result?
  3. What is the proper way of querying for that index so that we can obtain the required results?
  4. Are there any other constructive suggestions?
Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,339 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.