Indexing and searching special characters java

I need to index the my documents as they are without removing the special characters. I also need to search for the exact phrase such as: s**
When I search for s** using mathphrase query it removes ** from the phrase and searches only for s.
I also don't know how to use analyzer and tokenizers in my java code. Please explain that as well.
This is the java code I use to create my index.
i> ndent preform IndicesAdminClient indicesAdminClient = client.admin().indices();

                            .put("index.mapping.total_fields.limit", indexFieldLimit)
                            .put("refresh_interval", -1)

This is my search query code -


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