Questions tagged [pyes]

pyes is a connector to use elasticsearch from python.

pyes is a connector to use elasticsearch from python that features Thrift/HTTP protocols, bulk insert/delete, Index management and facet support.

72 questions
2
votes
0 answers

Slow test cases when using elastic search (pyes)

I recently added elastic search to our stack and it is slowing down our test cases. In order to keep the tests from trampling each other I isolated them by index. This seems to be the cause. Creating and Deleting indexes seems to be slow. I haven't…
Douglas Ferguson
  • 1,242
  • 2
  • 14
  • 25
2
votes
1 answer

ElasticSearch with pyes: bulk index

I have a 200M documents index I would like to reindex. I wrote the following script that goes over documents in the old index and puts them with balk insert into the new index. The size of each bulk is 2000 documents. search_obj =…
diemacht
  • 2,022
  • 7
  • 30
  • 44
2
votes
1 answer

elasticsearch BindTransportException at startup

This is the exception I'm getting starting up elasticsearch: STATUS | wrapper | 2013/03/21 00:43:42 | Launching a JVM... INFO | jvm 1 | 2013/03/21 00:43:42 | WrapperManager: Initializing... INFO | jvm 1 | 2013/03/21 00:43:45 | {0.19.4}:…
Niranjan Sagar
  • 819
  • 1
  • 15
  • 17
2
votes
1 answer

Convert the "facet_filter" query into pyes format

I have a following query and I want to change that query into PyES: { "facets": { "participating-org.name": { "terms": { "field": "participating-org.name" }, "facet_filter": { …
suraz
  • 105
  • 1
  • 1
  • 11
2
votes
1 answer

Translating ElasticSearch Facets Query into PyES

I have a following query and I want to change that query into PyES: { "facets": { "participating-org.name": { "terms": { "field": "participating-org.name" }, "nested":…
suraz
  • 105
  • 1
  • 1
  • 11
2
votes
1 answer

Elastic Search: pyes.exceptions.IndexMissingException exception from search result

This is a question about Elastic-Search python API (pyes). I run a very simple testcase through curl, and everything seems to work as expected. Here is the description of the curl test-case: The only document that exists in the ES is: curl…
diemacht
  • 2,022
  • 7
  • 30
  • 44
2
votes
1 answer

Rename fields in elasticsearch response

I'm using PyES library for quering the elastcsearch. Let's imagine that my query looks like: query = MatchAllQuery() query = query.search( fields=[ "content.title", "content.description", "content.timestamp", …
gakhov
  • 1,925
  • 4
  • 27
  • 39
2
votes
1 answer

How to use TermQuery to do an AND query across multiple terms?

I'm am using elasticsearch using the pyes Python library. Suppose I wanted to find all documents with title="Rainbow" AND artist="Kermit". The following returns documents with title="Rainbow" OR artist="Kermit". How do I change this to an…
cailinanne
  • 8,332
  • 5
  • 41
  • 49
2
votes
1 answer

Retrieving specif fields from nested object returned by elasticsearch

I am new to elasticsearch. I am trying to retrieve the selected fields from nested object returned by elasticsearch. Below is the object stored in elasticsearch index: { "_index": "xxx", "_type": "user", "_id": "2", "_version": 1, …
nikhil tyagi
  • 373
  • 1
  • 4
  • 8
1
vote
0 answers

Elasticsearch ranking issue

I am facing a strange but odd issue in Elasticsearch ranking results. The problem is Elasticsearch results are not consistent. For the same set of documents and query, Elasticsearch is returning different answers !! The first 10 results are always…
Sreejithc321
  • 297
  • 3
  • 19
1
vote
1 answer

Elasticsearch is missing data when querying after insert

I have a test that does the following: create an index on ES using pyes insert mapping insert data query the data to check if it fits the expected result However when I run this test, sometimes it would find no result, and sometimes it would find…
JChao
  • 2,178
  • 5
  • 35
  • 65
1
vote
0 answers

NoneType is not callable using elasticsearch from pyes

My code is: import pyes conn = pyes.ES(myes_path) siplist =['a','b','c'] diplist = ['d','e','f'] bf = pyes.filters.BoolFilter() bf.add_must(pyes.filters.TermsFilter('sip',siplist)) bf.add_must(pyes.filters.TermsFilter('dip',diplist)) fq =…
lin
  • 53
  • 3
1
vote
1 answer

Query DSL not working in pyes search

I am trying to use a custom query DSL to get results using the pyes library. I have query DSL that works when I use the command line curl -XGET localhost:9200/test_index/_search -d '{ "query": { "function_score": { "query":…
1
vote
0 answers

How to make filter aggregations using PyES

{ "aggs" : { "in_stock_products" : { "filter" : { "range" : { "stock" : { "gt" : 0 } } }, "aggs" : { "avg_price" : { "avg" : { "field" : "price" } } } } } } How to generate…
1
vote
1 answer

Setting 'index' property for all sub-fields of a field

When trying to add term facets, I face the issue that the terms get tokenized into separate words. For example, if an attribute (field) Kind has values medium kind of shirt and large kind of shirt, the terms become - medium, large, kind, of,…
PritishC
  • 508
  • 8
  • 18