I interpret the range query to be values literally from 990 to 991,
which should then only return the "990" document above. But it appears
that ES is interpreting the query to be something like [990*+TO+991*].
Can I use the _search endpoint to have it do a literal value search
instead of what appears to be a wildcard search?
I interpret the range query to be values literally from 990 to 991,
which should then only return the "990" document above. But it appears
that ES is interpreting the query to be something like [990*+TO+991*].
Can I use the _search endpoint to have it do a literal value search
instead of what appears to be a wildcard search?
I am using a range query. I already answered why I'm not using JSON
in the question I asked. In case you missed it.
"""
...and making GET requests via the "_search?q=" URI
just for testing purposes before I turn the query into a JSON string.
"""
My documents have fields. Not sure what you mean by identical, because
a document cannot have more than one field with the same name, but if
you mean do I have documents that have identical field names, then
yes, some documents have the same field names as other documents. My
example illustrates that; the "sourceSize" field.
The mapping configuration is the default supplied with ES.
I interpret the range query to be values literally from 990 to 991,
which should then only return the "990" document above. But it appears
that ES is interpreting the query to be something like [990*+TO+991*].
Can I use the _search endpoint to have it do a literal value search
instead of what appears to be a wildcard search?
yep, I'm sure I'm indexing them as strings; the _mapping endpoint confirms
that.
How do range queries work with strings? Is the answer "the behavior is
undefined"?
Is ES looking for anything that begins with the "from" value, in this case
anything that begins with 990 ? and also looking for anything that begins
with 901 ?
My documents are kinda big, see attachment for 1 of them. The rest of the
couple hundred thousand are permutations of that. If you want to test it on
small scale, just create a couple docs with 1 field, a numeric that is
stored as a string, and try to do a range query on it (using my example).
Is what you would get. But I don't "get" how the 1st or 2nd entries qualify
as a match, because even as strings they are longer than my range. So I
don't understand why they match. I might understand if ES returned
Because in that case, the strings are at least the same length as the
values in the range query (900 and 901) even if the returned matches are
"incorrect" from a numeric point of view.
How do range queries for string values work in ES?
yep, I'm sure I'm indexing them as strings; the _mapping endpoint confirms
that.
How do range queries work with strings? Is the answer "the behavior is
undefined"?
Is ES looking for anything that begins with the "from" value, in this case
anything that begins with 990 ? and also looking for anything that begins
with 901 ?
My documents are kinda big, see attachment for 1 of them. The rest of the
couple hundred thousand are permutations of that. If you want to test it on
small scale, just create a couple docs with 1 field, a numeric that is
stored as a string, and try to do a range query on it (using my example).
Is what you would get. But I don't "get" how the 1st or 2nd entries
qualify as a match, because even as strings they are longer than my range.
So I don't understand why they match. I might understand if ES returned
Because in that case, the strings are at least the same length as the
values in the range query (900 and 901) even if the returned matches are
"incorrect" from a numeric point of view.
How do range queries for string values work in ES?
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.