Python's official low-level client for Elasticsearch
Questions tagged [elasticsearch-py]
194 questions
0
votes
1 answer
Elasticsearch Search/filter by occurrence or order in an array
I am having a data field in my index in which,
I want only doc 2 as result i.e logically where b comes before
a in the array field data.
doc 1:
data = ['a','b','t','k','p']
doc 2:
data = ['p','b','i','o','a']
Currently, I am trying terms must…

DARK_C0D3R
- 2,075
- 16
- 21
0
votes
1 answer
Is there a reason there is inconsistent behavior when doing a search on an elastic index after it is reindexed?
I am using the elasticsearch python API and when doing a search on an index that was recently reindexed I see some behavior where I sometimes get results, and sometimes don't. The only way to reproduce this behavior is running the code over and over…

Justin Reddick
- 441
- 1
- 5
- 20
0
votes
1 answer
What is the correct way to use the elasticsearch-dsl Percolate query?
s = Search(index='test-index').using(client)
q = Q('percolate',
field="query",
documents=list_of_documents)
s = s.query(q)
p = s.execute()
I am attempting to run a percolation query against an index, with a list of documents…

Justin Reddick
- 441
- 1
- 5
- 20
0
votes
1 answer
Using elasticsearch inside Docker: Failed to establish a new connection
I am currently attempting to containerize an application which includes writing to a database with Elasticsearch, but get connection problems. The docker-compose.yml file currently looks something like this:
version: "3"
services:
es:
image:…

zenofpython
- 182
- 1
- 2
- 14
0
votes
1 answer
Partial word search not working in elasticsearch (elasticsearch-py) using mongo-connector
Currently I've indexed my mongoDB collection into Elasticsearch running in a docker container. I am able to query a document by it's exact name, but Elasticsearch is unable to match the query if it is only part of the name. Here is an example:
>>>…

najitaleb
- 27
- 6
0
votes
0 answers
Time-Based Indexing in Elasticsearch in python? like daily logs date suffix index
i am developing a 3rd party tool which is fetching report data from apis, i am indexing this in elastic search using
django_elasticsearch_dsl
But every time i index the fetched data it overrides the previous one.
one approach was mentioned in…

AbdulSamad
- 101
- 1
- 9
0
votes
1 answer
How to show only results that user has access to
Database structure for my Python application is very similar to Instagram one. I have users, posts, and users can follow each other. There are public and private accounts.
I am indexing this data in ElasticSearch and searching works fine so far.…

rsrx
- 1,433
- 1
- 13
- 25
0
votes
1 answer
How to get data from elastic search, if new data came then update it, and again inject it?
I have nearly 200 000 lines of tuples in my Pandas Dataframe. I injected that data into elastic search. Now, when I run the program It should check whether the present data already there in elastic search if not present insert into it.

Satya
- 11
- 3
0
votes
0 answers
Is there a way to profile elasticsearch serialization/deserialization?
I am trying to obtain documents from elasticsearch rapidly. Some of the queries take several seconds to get the results to the python client.
When I tried the to run same query with _count, the results are instant.
I know that we can profile the…

Miroslav Stola
- 158
- 1
- 2
- 12
0
votes
2 answers
Any suggestions to customize an analyzer when using query match with elasticsearch-py?
I can't apply a custom analyzer when using query match with elasticsearch-py.
I customized an analyzer called custom_lowercase_stemmed and used es.indices.put_settings to update the index setting.
However, it couldn't find the analyzer when I do a…

Slack X
- 3
- 2
0
votes
1 answer
Really huge query or optimizing an elasticsearch update
I'm working in documents-visualization for binary classification of a big amount of documents (around 150 000). The challenge is how to present general visual information to end-users, so they can have an idea on the main "concepts" on each category…

gal007
- 6,911
- 8
- 47
- 70
0
votes
0 answers
Elasticsearch-Py bulk not indexing all documents
I am using the elasticsearch-py Python package to interact with Elasticsearch through code. I have a script that is meant to take each document from one index, generate a field + value, then re-index it into a new index.
The issue is that there is…

mswank
- 103
- 1
- 9
0
votes
0 answers
Filter on values present as a list of objects in elastic search
I am stuck a place where I am not able to construct a query that will help me query a particular field which is actually a list of objects.
Sample document:
"sample_object" : {
"name" : "TRS",
"name_number" : 2096873,
"dob" :…

inthevortex
- 334
- 5
- 20
0
votes
1 answer
Transferring data from elasticsearch to influx
I am trying to send data from Elasticsearch to Influxdb. Is there any other way to do this except writing plugins and configuration files. I am new to both these databases, and trying to understand the overall picture.
Also, am I right in…

Nisha
- 397
- 1
- 5
- 16
0
votes
1 answer
Bulk updating without type using elastic search py
I'm trying to do a bulk insert using elastic search py, but I don't want to specify a type, but it won't allow me to specify None or "" for the value of type. How can I get around this?
bulk_data = []
this_merchant_product = {'field1':…

Ronak Vora
- 185
- 3
- 16