Questions tagged [elasticsearch-py]

Python's official low-level client for Elasticsearch

194 questions
1
vote
2 answers

how to feed data to Elasticseach as Integer using Python?

i am using this python script to feed my data to elasticsearch 6.0. How can i store the variable Value with type float in Elasticsearch? I can't use the metric options for the visualization in Kibana, because all the data is stored automatically as…
AhmyOhlin
  • 519
  • 4
  • 8
  • 18
1
vote
2 answers

indexing custom Django model fields in wagtail

We're using Django MarkupField to store Markdown text and it works quite well. However, when we try to index these fields in Wagtail we get serialization errors from Elasticsearch, like this: File…
A Lee
  • 7,828
  • 4
  • 35
  • 49
1
vote
1 answer

Different version of Elasticsearch-py lib within Python script

I am trying to get the data from Elasticsearch (ver. 1.7), and post it into Elasticsearch (ver. 5.2) using Elasticsearch-py with 1 Python script. But the recommended way within official docummentation…
Olia
  • 815
  • 4
  • 16
1
vote
1 answer

Perform nested search using elasticsearch dsl

Hi I want to perform a nested search using elasticsearch dsl where a document field has nested json data in it so I want specific nested key values from it like - Below is the document:- { "_index" : "data", "_type" : "users", "_id" : "15", …
Mayank Singh
  • 131
  • 4
  • 9
1
vote
2 answers

Python elasticsearch range query

I know that there are several alternative elasticsearch clients for python beyond this one. However, I do not have access to those. How can I write a query that has a 'less than or equal' logic for a timestamp? My current way of doing this is: query…
Hal T
  • 527
  • 7
  • 22
1
vote
0 answers

elasticsearch python update_by_query

I've been trying to use update_by_query feature provided in python from elasticsearch import Elasticsearch import json try: es = Elasticsearch(['localhost','127.0.0.1'],port=9200,maxsize=25,) print "Connected", es.info() except…
1
vote
1 answer

How to retry indexing with elasticsearch-py when using bulk streaming?

I have occasional BulkIndexError when using streaming_bulk helper. Is there any way to configure client to retry on such errors? What is the best way to handle errors when using helpers?
Oleksiy
  • 6,337
  • 5
  • 41
  • 58
1
vote
1 answer

ImportError when importing elasticsearch.helpers in Python

I am using a docker container with Ubuntu 16.04 Xenial with a Python 3.5.2 virtual environment. Every time I am trying to initialize the server uWSGI I am getting the following Python error: File…
Ander
  • 5,093
  • 7
  • 41
  • 70
1
vote
1 answer

elasticsearch watcher could not parse search input

I'm trying to configure an Elasticsearch Watcher Watch to alert on certain messages, but I'm unable to get my search input to work. I tried using both Sense and elasticsearch-watcher-py, but Watcher always returns a…
1
vote
1 answer

elasticsearch-py search returns list objects when fields option is used in query

Using Elasticsearch.search method in elasticsearch-py Search 1: Without using fields option in search: search_body = { "filter" : { "term" : { …
1
vote
1 answer

Python query ElasticSearch path with backslash

I'm using the Elastic search extension to Python, trying to query specific path. Here is my wrapped query: { "size": 1000, "query": { "filtered": { "filter": { "bool": { "must": [ { "term": { …
Eli
  • 4,576
  • 1
  • 27
  • 39
1
vote
2 answers

Elasticsearch-py update API with script

I'm trying to use the Update API via the elasticsearch-py python client on ES 2.1.1 and I'm having trouble. es.index(index='boston', doc_type='stem_map', id=111, body={'word': 'showing', 'counter': 29}) es.get(index='boston', doc_type='stem_map',…
plam
  • 1,305
  • 3
  • 15
  • 24
1
vote
2 answers

Elasticsearch HTTP API or python API

I am newbie in the real-time distributed search engine elasticsearch, but I would like to ask a technical question. I have written a python module-crawler that parses a web page and creates JSON objects with native information. The next step for my…
nbompetsis
  • 61
  • 1
  • 7
1
vote
2 answers

Elasticsearch Python emojis and term offsets in analyzers

I'm using Elasticsearch with the Python client and I have a question about the interaction between unicode, ES, analyzers, and emojis. When I try to run a unicode text string that contains an emoji character through the ES analyzer, it seems to…
plam
  • 1,305
  • 3
  • 15
  • 24
1
vote
1 answer

Spark machine learning and Elasticsearch analyzed tokens/text in Python

I'm trying to build an application that indexes a bunch of documents in Elasticsearch and retrieves the documents through Boolean queries into Spark for machine learning. I'm trying to do this all through Python through pySpark and…
plam
  • 1,305
  • 3
  • 15
  • 24