From what I understand, it should only returns records in which the subject field contains "mystring". But ES is returning all records that contains mystring in all fields.
What exactly causes that? Is it possible to change this behavior?
I am not familiar with the simple query string query, but I am assuming it
does not support having the field name as part of the query string, one of
the "simple" aspects. Either switch to the normal query string query, or
remove the field from the query string and explicitly place it in the field
parameter:
You're correct. I will have to parse this manually since the normal query_string will throw exceptions if there are syntax errors.
I was trying to provide a "google like" experience for search and somehow thought that simple query search was what I needed. But without supporting search by specific fields, it's definitely not what I need.
It looks like I need something like query_string but without exceptions. Do you know if this is supported by ElasticSearch?
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.