1

need help in formulating a basic elasticutils search query

I am trying to test elasticutils mainly becz I was not able to get optimum performance for #searches results / second. ( more details : here )

So far here is what I have done.

es=get_es(hosts=['localhost:9200'],timeout=30,default_indexes=['ncbi_taxa_names'],dump_curl=CurlDumper())


es.get_indices()
# [2012-08-22T15:36:10.639102]
curl -XGET
 http://localhost:9200/ncbi_taxa_names/_status
Out[26]: {u'ncbi_taxa_names': {'num_docs': 1316005}}

S().indexes('ncbi_taxa_names').values_dict()
Out[27]: [{u'tax_name': u'Conyza sp.', u'tax_id': u'41553'}, ...

so what I want to do is formulate a query where I can search for { "taxa_name":"cellvibrio"} and then do some comparison to how many search results I can retrieve with elasticutils compared to pyes.

May be it has something to do with the way the ES is running locally and not with the API's.

Update1

I tried the following and the searh results are still very similar to what I am getting from pyes. Now I am beginning to wonder whether it has something to do with how the local ES is running . Still need help figuring that out.

es=get_es(hosts=['localhost:9200'],timeout=30,default_indexes=['ncbi_taxa_names'],dump_curl=CurlDumper())


es.get_indices()
# [2012-08-22T15:36:10.639102]
curl -XGET
 http://localhost:9200/ncbi_taxa_names/_status
Out[26]: {u'ncbi_taxa_names': {'num_docs': 1316005}}

s=S().indexes('ncbi_taxa_names').values_dict()
Out[27]: [{u'tax_name': u'Conyza sp.', u'tax_id': u'41553'}, ...

results = s.query(tax_name='aurantiacus')  # using elasticutils

Appreciate your help.

Thanks!

Community
  • 1
  • 1
Abhi
  • 6,075
  • 10
  • 41
  • 55
  • I could not tag the question with "elasticutils" as there is no such category and my score doesn't allow me to create one – Abhi Aug 22 '12 at 23:03

0 Answers0