I am using the Azure index for an index search.
I have created custom SWMLuceneAlongWithCustomHyphenAnalyser analyzer for escaping - (special characters), which looks like below
"analyzers":[
{
"name":"SWMLuceneAlongWithCustomHyphenAnalyser",
"@odata.type":"#Microsoft.Azure.Search.CustomAnalyzer",
"tokenizer": "keyword_v2",
"tokenFilters": [
"lowercase"
]
}
]
E.g. for escaping - my index search query is.
&search=lowerSystemID:/.*ryan\-yeti\-win10.*/lowerMachineTag:/.*ryan\-yeti\-win10.*/&$select=lowerProductKey,lowerSystemID,lowerMachineTag&$filter=(lowerSystemID ne null)&$count=true&$top=999&queryType=full&$skip=0
This query responds back with expected results.
But we are running into issues with query value of !@#$%^&*()*^w
It should return back data if it exists else show zero results. Right now it returns all the records. Below is the query after escaping all the special characters. Not sure what am I doing wrong here, or maybe the analyzer is not the correct one:
&search=lowerSystemID:/.*\!\@\#\$\%\^\&\*\(\)\*\^w.*/lowerMachineTag:/.*\!\@\#\$\%\^\&\*\(\)\*\^w.*/&$select=lowerProductKey,lowerSystemID,lowerMachineTag&$filter=(lowerSystemID ne null)&$count=true&$top=999&queryType=full&$skip=0
Any suggestions will help!