POST /search_test/_doc
{
"text":"Jack and Jill went up the hill."
}
GET /search_test/_search?q=j%2A
GET /search_test/_search?q=j...
I would expect those two queries to return the same document since both of those regular expressions should match on "Jack" and "Jill", but they do not. Searching for the regular expression j... returns nothing. As stated here, I would expect the periods to match on any character.
To explain, your queries mean two very different things. The first one searches for j in the inverted index (think of it as an index in a book, you jump to the letter J, but it only contains Jack and Jill, but nothing for J).
The second one J* searches for everything starting with J and thus Jack and Jill are hits.
I'm not sure I follow - I'm expecting the periods in the query string to act as regular expression dots, i.e. match on any character (docs). I am unable to execute any regular expressions using a query_string, which is supposed to be supported:
Elasticsearch supports regular expressions in the following queries:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.