Questions tagged [elasticsearch]

Elasticsearch is a search server based on Lucene. It provides a distributed, multitenant-capable, full-text search engine with a RESTful web interface and schema-free JSON documents. Elasticsearch is developed in Java and is released as open source under the terms of the Apache License. Elasticsearch is the second most popular enterprise search engine.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
29 views

Functions to part by part create an ElasticSearch query [closed]

The project uses functions to part by part create an ElasticSearch query. In this case, the final query would look like this: ...
  • 1
0 votes
0 answers
40 views

Flask backend for literature database using elasticsearch

The following code is at the core of a larger project (link for context), namely a literature database which mirrors a Zotero library. The following part of the code takes arguments which are put in ...
  • 1
0 votes
0 answers
624 views

Go middleware for logging with ZAP and elastic APM

Please be brutal with my attempt at logging middle ware. The aim of the middle ware is to tag all the logging with the same tracing detail as the apm modules from elastic that are sent to apm-server ...
1 vote
0 answers
23 views

Spring Boot Elastic Seemingly ignoring second Query

I have some code I've written which I need a review of (if possible) as I know I have a bug somewhere. Most likely due to my (lack) of understanding of some concepts in ElasticSearch and Spring. For ...
  • 153
4 votes
0 answers
1k views

Elasticsearch update script using python bulk update [closed]

I'm using this script to bulk update docs in my index. I need to update a field of a doc in Elasticsearch and add the count of that doc in a list inside python code. The weight field contains the ...
2 votes
2 answers
130 views

Feedback on generator functions and class composition in Python 3

I have written a Python script whose purpose is to read logs from CloudWatch and then post them to ElasticSearch. It is not quite finished but I've progressed far enough that I could benefit from ...
1 vote
0 answers
54 views

Elastic search Java

Below is a json schema I have in elastic search ...
1 vote
0 answers
422 views

Indexing documents in Elastic Search using Refresh.True - Performance hit and how can it be improved? [closed]

I have an AWS Elastic Search server. Using mapping template and an index strategy. ...
1 vote
0 answers
123 views

Can parallel_bulk compete with curl command for insert in ES?

I got some documents (size about 300o/doc) that I'd like to insert in my ES index using the python lib, I got huge time difference between the code and using ...
  • 171
4 votes
1 answer
11k views

Building a dynamic Elasticsearch query using NEST

I am using Elasticsearch v6 and NEST to search the advertisements that I create on my website. This is my Document (from which I build the Index): ...
2 votes
0 answers
367 views

Classes for an online shopping website, using a combination of Inheritance and Composition

I am developing an online shopping website. I have a class Item, which contains all the common attributes of all products (I will explain the interfaces at the end) ...
user avatar
2 votes
1 answer
323 views

Too slow JSON data processing using SQL

I have a case study where I need to take data from a REST API do some analysis on the data using an aggregate function, joins etc and use the response data in JSON format to plot some retail graphs. ...
  • 185
6 votes
2 answers
262 views

Boolean string to elasticsearch query OSS module

I am putting together a little module for oss release that will let you parse a boolean expression consisting of and/AND/or/OR's (no brackets yet) and output a ...
1 vote
0 answers
96 views

Parsing JSON documents in java

I consume JSON data from Kafka Topics, and parse the JSON to create a Document ID (Unique Identifier) to persist the JSON into Elasticsearch. IDGenerator.java ...
1 vote
0 answers
625 views

Java Client with ElasticSearch SearchQuery if the value of field is not empty

I developed a java Client to interrogate with elasticsearch. I want to pass in my method a java bean (with many attributes) as a parameter, and I want also that my query apply search just on field ...
  • 111
5 votes
1 answer
1k views

Python script to manage elasticsearch backups

The following is a Python 3 script I wrote to take and delete elasticsearch snapshots. Could anyone please point out any issues? I am concerned that I have structured the code poorly (particularly the ...
  • 51
4 votes
3 answers
116 views

Create elasticsearch document from php

Can you please provide some improvement advice for the following function? It is working OK now, but as I have zero experience with PHP I guess there is a lot of room for improvement. ...
  • 43
4 votes
1 answer
841 views

Converting Logstash YAML style configuration file into ElasticSearch Logstash JSON style config

I am new in python and have written first code to convert Logstash YAML style configuration file into ElasticSearch Logstash JSON style config. Please have a look at my piece of code and let me know ...
  • 149
0 votes
1 answer
55 views

Getting all the master nodes in an elasticsearch cluster

I am trying to get all the master nodes in an elasticsearch cluster using this code. Can I reduce/simply this or optimize further? ...
2 votes
0 answers
1k views

Elasticsearch: Simple name search

I'm trying to implement a simple name search using elasticsearch and a java app as the client. Schema: ...
3 votes
0 answers
243 views

Wrapping a node.js module using elasticsearch

I need to use elasticsearch in my node.js project, whose API looks like the following: ...
2 votes
1 answer
897 views

NodeJS script to dump data from Redis to Elasticsearch

I have about a million records in Redis which I want to dump into Elasticsearch periodically. I just want to make sure that my script is decent enough in terms of speed and no memory leaks. ...
  • 831
2 votes
0 answers
826 views

elastic search index/mapping creation

Including the full module, but the method I'm interested in is createIndex, feels more complicated than I think it should be. Still new at both node and elasticsearch ...
  • 121
1 vote
1 answer
759 views

Saving comments and submissions from Reddit using Elasticsearch

I wrote a script to save comments and submissions from Reddit using Elasticsearch. Is there any way to improve the speed of inserting new items into Elasticsearch? ...
  • 1,517
3 votes
1 answer
396 views

Searching for something at a location

I'm using Searchkick in a situation where a user might write the location they are searching for, or the thing they are searching for, or both. I've been working on the below code for most of the ...
  • 65
2 votes
0 answers
4k views

Little script to change the mapping of an existing ElasticSearch index while reindexing it

I tried to implement the idea given in the elasticsearch doc about reindexation albeit I think they must code it inside ElasticSearch and expose it as an API. ...