Prevent leading wildcard in uri search


(makovskij) #1

Hello ,

I use uri searches and i found out that it took about 20 seconds or more if i use leading wildcard searches.
For example:

http:localhost:9200/_search?q=user:andrea*&pretty
works very fast and
http:localhost:9200/_search?q=user:*ndreas&pretty
takes 10 seconds .

Is there a way from elasticsearch to prevent leading wildcards? something i can put into the elasticsearch.yml or some parameters i can add to make the searches faster (disable leading wildcards in uri searches).

regards
andi


(Mark Walkom) #2

Not natively, no.


(system) #3