Hi,
I am using ArcGIS JavaScript API 4.10. I have implemented the search widget in my application. I am able to search feature using English words but when I am trying to search using Arabic word, I got 'No results found' in suggestion Template. I have set below two properties for Search Widget
searchFields: ["NAMEENGLISH", "NAMEARABIC"],
suggestionTemplate: "{NAMEENGLISH}, {NAMEARABIC}",
1. Search using English Characters(Musaffah)
2. Search using Arabic Characters(مصفح)
I am not getting suggestion for the Arabic Case. Any help here.
Hi, to solve this issue should be done following item
1. try to hosting the Esri Javascript API locally.
2. go to the "search.js" in this path "https://<your machine>/arcgis_js_api/library/3.27/3.27/esri/dijit/search.js" and open it in the editor.
3. go to the method "_whereClause"
4. change this line from
'this.reHostedFS.test(b.url) && this._containsNonLatinCharacter(a) &&(f = "N");'
to
'this._containsNonLatinCharacter(a) && (f = "N");'.
5.check now will be solved.
A word of caution, we do not recommend or allow people to modify the JS API. Please see our policy here:
I tested a sample using Arabic localization, it seems to give suggestions.
https://codepen.io/noash/pen/KKKaaOP
Are you searching a layer, a custom Locator source, or using the Esri world geocoding service?
@Noah-Sager I'm facing the same issue searching in a LayerSearchSource. It is registered in GDB.
I test in ArcGIS Pro and it returns results only if I added N before searchTerm like "where field=N'text'"
How can I add it to the code?
Find the solution in this thread