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
0
votes
0 answers

Elastic search gives same result only in alternate queries

I'm facing an issue while working with elastic search. While searching with same query on the same data, the ES returns same _meta.score (of the results) only on the alternate calls. That is, if the _meta.score of the result is 'A' on the first…
Vishnu
  • 1
  • 1
0
votes
0 answers

pyes minimal example: ElasticSearchException: Unknown exception type: 408

I am trying to get pyes working and produced a minimal example derived from the docs from pyes import ES conn = ES('127.0.0.1:9200', timeout=30, retry_time=60, max_retries=10) mapping = { "properties": { 'name': {"type" : "text"} …
carl
  • 4,216
  • 9
  • 55
  • 103
0
votes
1 answer

Pyes Elastic Search Refresh API Issue

I recently upgraded Elastic Search from v 1.7 to 2.4. I'm working in python and using pyes library to communicate to Elastic Search. In my code, I have this line in place to refresh index. con.indices.refresh() This was working fine with ES 1.7,…
Ibrahim
  • 837
  • 2
  • 13
  • 24
0
votes
1 answer

Django ElasticSearch / pyes : How to search with two filters?

I need to add another param 'type' to my query to filter with This is what I have right now and it works for me: conn = pyes.ES(settings.ES_URL) query_string = self.request.GET['q'].lower() type = self.request.GET['type'].lower()#not…
Armance
  • 5,350
  • 14
  • 57
  • 80
0
votes
1 answer

Elastic Search Query value that is a dictionary

I have a index (7111) in elastic search that contains event log data. One of the fields (_source) contains a Dictionary of data. Is there any way using python to formulate a elastic search query that searches the key and values in the…
user1314011
  • 153
  • 2
  • 5
  • 12
0
votes
1 answer

How to get a random document in pyes from elasticsearch

How do I use pyes to get a random document? I have a new cluster I have access to and want to explore from pyes import * conn = ES('127.0.0.1:9200', timeout=3.5) #Now what?
Tampa
  • 75,446
  • 119
  • 278
  • 425
0
votes
0 answers

Usage of NestedFilter and changes in mapping

I'm trying to create a filter on the basis of some product attributes which I've indexed. Earlier, they were indexed as follows -: "attributes": { "name1": "value1", "name2": "value2", .... } The filter that I used earlier was generated…
PritishC
  • 508
  • 8
  • 18
0
votes
0 answers

Use ElasticSearch search URI into Python PyEs client

I have the following working query, using CURL: curl -X GET 'http://myhost/myindex/_search?q=text:%7B1933%20TO%201949%7D' which identifies all documents inside the index myindex which in the text field (string type) contains mentions of dates…
Crista23
  • 3,203
  • 9
  • 47
  • 60
0
votes
1 answer

Aggregations on PyElasticSearch (pyes)

I wish to calculate value-count aggregations on some indexed product data, but I seem to be getting some parameters in the ValueCountAgg constructor wrong. An example of such indexed data is as follows -: { "_index": "test-index", "_type":…
PritishC
  • 508
  • 8
  • 18
0
votes
1 answer

Using pyes, how do I let elasticsearch choose the index id?

Below is how I index: conn = ES(['127.0.0.1:9200'],bulk_size=bulk_count) conn.index(tj,data['index'],data['type'],str(uuid4()),bulk=True) I am using uuid but would rather have ES choose the index id for performance reasons. How do implement…
Tampa
  • 75,446
  • 119
  • 278
  • 425
0
votes
1 answer

Pyes search on particular field gives no results

I have a document indexed whose structure is as follows: { "_index": "yelp", "_type": "user", "_id": "ABC", "_score": 1, "_source": { "yelping_since": "2007-07", "votes": {}, "review_count": 1798, "name": "TEST_USER", …
0
votes
1 answer

Does rescore support nested queries?

I am trying to rescore my query results using a nested query, but I get the following exception, which I believe means that rescore does not support nested queries: nested: ElasticsearchIllegalArgumentException[rescore doesn't support [path]]; Is…
kevad
  • 409
  • 1
  • 5
  • 15
0
votes
2 answers

pyes creates Python objects with colons in their names, can't address

I imagine I'm missing something really obvious here, but somehow I can't quite get it -- I'm using pyes to query an ElasticSearch endpoint pretty straightforwardly, so that I can then access the results by doing something like print…
serilain
  • 441
  • 4
  • 15
0
votes
1 answer

How to submit a query in pyES?

I have the following Python code to query an ElasticSearch index. No matter what query I try, I get an empty resultset. I seem to be missing some basic trick here. import sys import pyes from pyes.query import TermQuery, FuzzyLikeThisFieldQuery,…
Miklós Koren
  • 158
  • 2
  • 8
0
votes
1 answer

how to send a plain query to elasticsearch with pyes

I have a plain query that I would like to send to Elasticsearch through pyes without using pyes's builtin methods. The query works when it's CURLed. further below is my code, but I can't make it work. It returns this error when I iterate over the…
Jabb
  • 3,414
  • 8
  • 35
  • 58