Searching with special characters doesn't work

For example i created a document with book names:
"book_name": "newbook@@@1",
"author": "jhon doe"
"book_name": "oldbook@@@1___2",
"author": "jhon dave"

And if i search with search query : "@@@" , I don't get any results, the search doesn't work.
Does app-search not support searching by special characters?

When documents are indexed into App Search (and Elasticsearch underneath it), text fields are analysed, filtered and prepared for later searching by using analysers. You can have a look into the analysis process in Elasticsearch analysis guide.

Part of the analysis is to strip the text fields from special characters that are not text specific, like in your case the at symbol. Thus, "newbook@@@1" would create two different tokens "newbook" and "1" (so they can be found when you specify "newbook" or "1" as your query).

Are special characters expected to be included by the end users on their searches?

Thanks for the answer @Carlos_D , i wanted to know if appsearch supports it or not. To answer your question yes we can expect users to search using a combo of special characters and normal characters to search.

App Search does not allow wildcard search or using special characters (as they will be stripped on the indexing / query analysis as described).

App Search supports Lucene like query syntax (for adding AND, OR, NOT and including / excluding terms).

Elasticsearch does support wildcard search, but take into account that these queries can be expensive (allow slow queries is required to use this feature).

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.