Hi,
I am very new to elastic search...I am trying to search 1 field with multiple values that are stored in a list...I am using a loop but it is not returning any values...any help pls?
the list contains 49846 elements
import elasticsearch
from elasticsearch import Elasticsearch
import elasticsearch.helpers
ES_HOST = {
"host": "localhost",
"port": 9200
}
ES_INDEX = "reviews"
ES_TYPE = "review"
es = Elasticsearch(hosts=[ES_HOST], )
for i in range (0, len(test)):
print test[i]
results_gen = elasticsearch.helpers.scan(
es,
query={'query': {'match': { 'categories' : test[i]}}},
index=ES_INDEX,
doc_type=ES_TYPE
)
results = list(results_gen)
df11 = buildReviewDataFrame(rdf1,results)
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.