Hi,
I tried to retrieve data which has 'AN' value. The query returns an empty results even though the document is available in ES. If I give any other value other than 'AN' then the query returns results as expected.
Is this anything related to 'AN'? Am I missing anything?.
wild guess (please provide more information like a the mapping of that field plus a sample document, plus the Elasticsearch version, plus the JVM version): Is this field using an analyzer that makes use of stopwords? Have you tried with an analyzer that is not using stopwords?
Thanks for your inputs. We are using the 2.4 version
We did the below modification and ES return results for the search criteria 'AN' .
index :
analysis :
analyzer :
default :
type : standard
stopwords : [you]
We are thinking of modify the stopwords settings as "none". Does it affect ES performance?
It does affect the needed storage space, as you have to store extra information in the inverted index about terms that occur in many documents. If it affects performance is incredible hard to tell without knowing the data.
By default Elasticsearch stores stopwords with the standard analyzer to prevent such issues as above.
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.