run ./automate.sh
a) This will create an es-test index and load the sample data.
b) Then it fire ./not_working.sh to run the query which is not
working as desired.
c) It will then delete the documents.
Issues:
i) The first query is searching for the text "A-Rod" globally.
Expected that only document 10990239 would be returned. But the
document 10990695 is returned as well since it has the word "Rod". If
you look at ./working.sh, you will see the difference between the
working and not working version, is that "fields.kicker" is used
instead of "_all". And this works as expected by returning only
document 10990239. Probably this is expected behavior because of the
special field "_all". Is that so?
ii) The second query adds on to the first query and add the additional
criteria that I want all documents which have state = "A" (aka active
or "D" for disabled). Expected that only document 10990239 would be
returned. But nothing was returned. What could be the issue here?
run ./automate.sh
a) This will create an es-test index and load the sample data.
b) Then it fire ./not_working.sh to run the query which is not
working as desired.
c) It will then delete the documents.
Issues:
i) The first query is searching for the text "A-Rod" globally.
Expected that only document 10990239 would be returned. But the
document 10990695 is returned as well since it has the word "Rod". If
you look at ./working.sh, you will see the difference between the
working and not working version, is that "fields.kicker" is used
instead of "_all". And this works as expected by returning only
document 10990239. Probably this is expected behavior because of the
special field "_all". Is that so?
Yes, thats how it would work... .
ii) The second query adds on to the first query and add the additional
criteria that I want all documents which have state = "A" (aka active
or "D" for disabled). Expected that only document 10990239 would be
returned. But nothing was returned. What could be the issue here?
Its because that field is analyzed by default, and "a" is a stop word, so it
gets removed. You would want to have this type of fields specified as index
"not_analyzed" in the mapping.
run ./automate.sh
a) This will create an es-test index and load the sample data.
b) Then it fire ./not_working.sh to run the query which is not
working as desired.
c) It will then delete the documents.
Issues:
i) The first query is searching for the text "A-Rod" globally.
Expected that only document 10990239 would be returned. But the
document 10990695 is returned as well since it has the word "Rod". If
you look at ./working.sh, you will see the difference between the
working and not working version, is that "fields.kicker" is used
instead of "_all". And this works as expected by returning only
document 10990239. Probably this is expected behavior because of the
special field "_all". Is that so?
Yes, thats how it would work... .
ii) The second query adds on to the first query and add the additional
criteria that I want all documents which have state = "A" (aka active
or "D" for disabled). Expected that only document 10990239 would be
returned. But nothing was returned. What could be the issue here?
Its because that field is analyzed by default, and "a" is a stop word, so it
gets removed. You would want to have this type of fields specified as index
"not_analyzed" in the mapping.
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.