Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
287 views

I checked the documentation of elasticsearch:7.x but still didn't find the way how I can force the python ES package to use my kerberos token. I can reach the ES through a browser, curl ( curl --...
papi1992's user avatar
  • 178
2 votes
1 answer
649 views

I am calling elasticsearch data using eland. The documentation is simple and I am able to implement it, but when searching the index it searches the index string using es_index_pattern which is ...
everestial's user avatar
  • 7,315
1 vote
1 answer
242 views

I am calling elasticsearch data using eland. The documentation is simple and I am able to implement it, but when searching the index it search using es_index_pattern which is basically a wildcard ...
everestial's user avatar
  • 7,315
4 votes
3 answers
6k views

I am able to query an index in elasticsearch. And, now I want to narrow down the data to some specific fields. But, I am keep getting errors. Here is my query: es = Elasticsearch(hosts="myhost&...
everestial's user avatar
  • 7,315
0 votes
1 answer
1k views

I want to update multiple docs using update_by_query in elasticsearch.py (version 7.13.1) My query is: es_query = { "query": { "match": {"user_id.keyword": ...
Ankita's user avatar
  • 165
0 votes
1 answer
317 views

I am trying basic commands in elasticsearch and I am stuck with basic search. My script: from elasticsearch import Elasticsearch INDEX_NAME = 'person' es = Elasticsearch([{'host': 'localhost', 'port'...
dom's user avatar
  • 444
0 votes
1 answer
358 views

I am trynig to index stackoverflow data. First of all I create an index with specified mapping and setting. @classmethod def create_index_with_set_map(cls, name, elasticsearch): "&...
Hamed Sanaei's user avatar
1 vote
2 answers
6k views

Till Oct 20, it was fine. Oct 21, it failed with the below messages. Can any one help here command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/...
Akbar B's user avatar
  • 53
-1 votes
1 answer
233 views

My input is <index_name>, <doc_id>, <field_name>, i want the value of the field I am looking for python-client equivalent of GET <index_name>/_doc/<doc_id>/?...
Kaushik J's user avatar
  • 1,082
0 votes
1 answer
63 views

I am using Elasticsearch 7.6.2 (by running the official docker image with the default options) and py-elasticsearch 7.6.0 (installed with version >=7.6 <8) I am trying to ...
Bob's user avatar
  • 6,252
3 votes
3 answers
710 views

I am using Django Haystack with ElasticSearch backend for my search page. I am using MongoDB as my Database. Everything was working fine in my search page. PROBLEM My web-application uses an external ...
No Reveal Name's user avatar
0 votes
0 answers
458 views

I have the following script search query: bdy = { "query": { "function_score": { "script_score": { "script": { "lang": "painless", "inline": "def test = "+test1+"; ...
Celebrimbor_mak's user avatar
4 votes
1 answer
3k views

i'm working with py-elasticsearch-dsl for my master, i'm creating a index of title documents in a corpus of turkish titles, and i need implements a custom lowercase analyzer for turkish language: ...
SalahAdDin's user avatar
  • 2,310
4 votes
1 answer
8k views

I have to find the matching documents which have the string, for example: "sky", within some "key" range. When I write separate match and range query, I get the output from the ES but it throws an ...
Amogh Mishra's user avatar
  • 1,258
5 votes
2 answers
10k views

Size of data to get: 20,000 approx Issue: searching Elastic Search indexed data using below command in python but not getting any results back. from pyelasticsearch import ElasticSearch es_repo = ...
Kishan Mehta's user avatar
  • 2,678
3 votes
4 answers
3k views

This is sample document. { "_index": "mqtt-index-2018.01.23", "_type": "iot_data", "_id": "AWEjA7LNRU4cTUO-Lyj4", "_score": null, "_source": { "message": "{\"datastream_name\": \"roshni\", \"value\":...
Roshni Kasliwal's user avatar
1 vote
1 answer
9k views

I am desperately trying to perform a simple search operation on elasticsearch, but fail since hours. This is my code: res = es.search(index="people", doc_type="test", body={"query":{"match":{"name": "...
Mugen's user avatar
  • 13
1 vote
0 answers
253 views

I was wondering if anyone had actually used the official python elastic search ES client in the context of flask-socketio (with either eventlet / gevent + the monkey patches)? The official python ES ...
Elrondy's user avatar
  • 43
0 votes
0 answers
1k views

I am trying to use elastic search libraries like pyelasticsearch and elasticsearch I am not getting any method where i can pass dataframe and that method will load data frame data to elastic search. ...
PriyalChaudhari's user avatar
2 votes
0 answers
1k views

I am attempting to bulk index a generator using the parallel bulk method from elasticsearch helpers in python, however it seems that this method doesn't perform anything. If I use the regular bulk ...
Aboogie's user avatar
  • 460
5 votes
0 answers
575 views

I'm new in Python and Elasticsearch. I'm trying to write code to insert documents in Elassticsearch using bulk. It is based on this description: http://pyelasticsearch.readthedocs.io/en/latest/api/#...
fikfok's user avatar
  • 51
2 votes
1 answer
385 views

I have two sets of hashes in single index with a different tag as an additional field like below: Index: hashes-* sha1-c tag abcdefg12345 collect abcdefg12345 collect ...
johnnyb's user avatar
  • 1,815
8 votes
5 answers
17k views

I'm using the ElasticSearch (2.4) and the official Python client to perform simple queries. My code: from elasticsearch import Elasticsearch es_client = Elasticsearch("localhost:9200") index = "...
iamdeit's user avatar
  • 6,135
0 votes
1 answer
988 views

I am using a py-elasticsearch to query elasticsearch: try: res = es.get(index='unique_names', doc_type='name', id=token, ignore=['404']) except elasticsearch.exceptions.NotFoundError: continue As ...
Jens de Bruijn's user avatar
1 vote
0 answers
162 views

I'm using msearch to query ES. following is my query:- [{ 'index': u 'INDEX', 'type': u 'TYPE' }, { 'query': { 'term': { 'FIELD1': u 'ID' } }, 'from': ...
Praful Bagai's user avatar
  • 17.6k
0 votes
1 answer
2k views

I am using Elasticsearch in python. I have data in pandas frame(3 columns), then I added two columns _index and _type and converted the data into json with each record using pandas inbuilt method. ...
Jack Daniel's user avatar
  • 2,621
2 votes
1 answer
6k views

I am using Python's Elasticsearch DSL package: http://elasticsearch-dsl.readthedocs.org/en/latest/search_dsl.html My sample elasticsearch entry looks like: { "_index" : "users", "_type" : "...
Ankit's user avatar
  • 4,840
0 votes
1 answer
202 views

I have the following mapping: { "dynamic": "strict", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, ...
Roland Dunn's user avatar
2 votes
1 answer
4k views

In Elasticsearch, one of my field is a date which I define the mapping with custom date format matching my date. However, some cases the value of my date field is just an empty string "LastUpdateDate"...
Philip K. Adetiloye's user avatar
2 votes
2 answers
6k views

How can i search in elasticsearch dsl python module on multi fields, example on title and body field and order it by created_at field DESC. I have this example that search only on title field: q = ...
Mirza Delic's user avatar
  • 4,381
1 vote
2 answers
12k views

How to rename the current cluster in elasticsearch config? i want to rename the cluster without it going down if possible.
Amogh Banta's user avatar
1 vote
1 answer
95 views

i have two documents stored in elasticsearch database one is { q :["python" , "foo"] } and other is { q :["python" , "moo","foo"] } now my problem is to search document in which python is on ...
maq's user avatar
  • 1,234
1 vote
1 answer
2k views

Say each document in my elasticsearch index is a blog post which consists of only two fields, title and tags. The title field is just a string while tags is a multi value field. If I have three ...
user avatar
4 votes
1 answer
4k views

I have two queries. {'bool': {'must': { 'terms': 'metadata.loc':['ten','twenty']} { 'terms': 'metadata.doc':['prince','queen']} } {'should': { 'match':...
Prannoy Mittal's user avatar
8 votes
1 answer
5k views

Updated: Turns out, this is not a function of cron. I get the same behavior when running the script from the command line, if it in fact has a record to process and communicates with ElasticSearch. I ...
Laizer's user avatar
  • 6,210
2 votes
0 answers
297 views

I faced a weird with elasticsearch python drivers and would like if someone can explain it to me! The below code works directly from cURL but doesn't work with python-requests or elasticsearch-py, ...
mjalajel's user avatar
  • 2,221
1 vote
1 answer
784 views

I try to use Percolator by Elasticsearch and I have a minor issue. Suppose our document looks like this: { "doc": { "full_name": "Pacman" "company": "Arcade Game LTD", "...
primoz's user avatar
  • 895
48 votes
4 answers
65k views

I can set mappings of index being created in curl command like this: { "mappings":{ "logs_june":{ "_timestamp":{ "enabled":"true" }, "properties":{ "...
user avatar
1 vote
0 answers
713 views

I have the following query: Bool(must=[Terms(avail_req=['Available'], boost=2.0), Terms(boost=2.0, sale_rent=['Sale']), Nested(path='listings', query=Bool(should= [Terms(boost=2.0, listings....
Prannoy Mittal's user avatar
1 vote
0 answers
370 views

Using ElasticSearch I'm trying to use the minimum_should_match option on a Terms Query to find documents that have a list of longs that is X% similar to the list of longs I'm querying with. e.g: { ...
m_vdbeek's user avatar
  • 3,784
-1 votes
2 answers
668 views

I aim is to store all unique term along with their md5 hashes in a database. I have a 1 million document index which has ~400000 unique terms. I got this figure from using aggregations in ...
Animesh Pandey's user avatar
-1 votes
1 answer
354 views

I want to push my data from a dictionary to Elasticsearch. How can I create an index for the same? I tried using the Curl commands as well on Linux server curl -XPUT 'http://localhost:9200/osint/' -d ...
Shruti Srivastava's user avatar
-1 votes
1 answer
352 views

I am using elasticsearch-py to index tweets (originally in JSON format). In order to preserve special characters like hashtags, user targets and emoticons, I specified a special mapping while creating ...
Satarupa Guha's user avatar
2 votes
1 answer
2k views

I'm currently trying to query ES through Python, using elasticsearch-py but with no success... I'm testing the request on the "elasticsearch-head" plugin and it works fine (results come scored) ...
besnico's user avatar
  • 271
1 vote
0 answers
102 views

{ "aggs" : { "in_stock_products" : { "filter" : { "range" : { "stock" : { "gt" : 0 } } }, "aggs" : { "avg_price" : { "avg" : { "field" : "price" } } ...
Subbu Pendyala's user avatar
10 votes
1 answer
6k views

Whats the correct way to disconnect an elasticsearch-py (python) client rsp. close an existing connection pool? I cannot find any information in the docs.
user2694588's user avatar
0 votes
1 answer
2k views

As part of data analysis, I collect records I need to store in Elasticsearch. As of now I gather the records in an intermediate list, which I then write via a bulk update. While this works, it has ...
WoJ's user avatar
  • 30.6k
8 votes
3 answers
17k views

I have documents of type: [{"msg":"hello", date: "some-date"},{"msg":"hi!", date: "some-date"}, ... I want to have the count of documents by day of week. For example x messages were sent on Monday ...
Sambhav Sharma's user avatar
1 vote
1 answer
190 views

Here is the sample data: In the type blog_comments, I have some comments data, whose structure like this: {"blog_id": 1, "comments": "Apple", "comment_id": 1} And for #1 and #2 blog, there are 6 ...
simomo's user avatar
  • 726
3 votes
1 answer
223 views

Is there a way to specify the search type when using pyelasticsearch? There's nothing in the documentation for 'scan', 'scroll', 'query_and_fetch', etc. Running the following code: from ...
Cam S's user avatar
  • 105