go-elasticsearch | The official Go client for Elasticsearch | REST library
kandi X-RAY | go-elasticsearch Summary
kandi X-RAY | go-elasticsearch Summary
The official Go client for Elasticsearch.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of go-elasticsearch
go-elasticsearch Key Features
go-elasticsearch Examples and Code Snippets
Community Discussions
Trending Discussions on go-elasticsearch
QUESTION
to build and run a local instance, im following the tutorial at
https://haha.readthedocs.io/en/latest/install.html
but i use the git repo
https://github.com/readthedocs/readthedocs.org.git
instead of
https://github.com/rtfd/readthedocs.org.git
for the "git clone" command, as the link in the tutorial does not exist.
i am also using venv
, and not virtualenv
, as i was not able to make virtualenv
work.
i then get to the step to run the following command
...ANSWER
Answered 2022-Mar-31 at 07:21You are using python 3.10 which does not have a whl file available on PyPi for pywin32==227
. Try the installation with a lower python version e.g. 3.9
QUESTION
I am using this library in go https://pkg.go.dev/github.com/elastic/go-elasticsearch/esapi#CatIndicesRequest to query from Elasticsearch.
I has some examples on querying but I am looking for a API method to get all index from Elasticsearch cluster. But I can't find one I can use from their doc. Does anyone know what the best way to get all index? like the http api _cat/indices
ANSWER
Answered 2022-Mar-23 at 09:05Here's a working example:
QUESTION
I am trying to call a local ES instance running on docker. I used the following instructions to setup my ES instance: https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started.html https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-dev-mode
I am able to play around with my instance on Kibana at http://0.0.0.0:5601/app/dev_tools#/console. Everything works upto here.
Now I am trying to define some sample documents using django models and index them through the library; I am following the instructions here: https://django-elasticsearch-dsl.readthedocs.io/en/latest/quickstart.html#install-and-configure
First, I add pip installed and added django_elasticsearch_dsl
to INSTALLED_APPS
Next, I added in settings.py:
...ANSWER
Answered 2022-Feb-28 at 09:47I figured that it was an issue with my certificate.
I needed to add some additional config param to the ELASTICSEARCH_DSL
variable. Adding this solves the issue:
QUESTION
I'm using go-elasticsearch as a elastic search client.
I tried to update document using code from here elastic/go-elasticsearch/api.update.go
However using the same code from GitHub I got:
[UpdateRequest] unknown field [Title]
So far I have only one document which looks like this
...ANSWER
Answered 2022-Feb-09 at 11:21Found solution here: a-simple-elasticsearch-crud-example-in-golang
Instead of using:
QUESTION
I have a model that uses django hashid fields for the id
.
ANSWER
Answered 2021-Aug-21 at 02:56For anyone interested, I managed to solve this by overriding the generate_id
method of the Document
so that the _id
used is just a plain string:
QUESTION
I have an array of documents to bulk indexusing the github.com/elastic/go-elasticsearch/v8 library.
Each document may be added to one of a handful of different indexes, so my code is something like:
...ANSWER
Answered 2021-Aug-20 at 10:08Could not find the details on official documentation. But Looking at this link it is recommended to share the client across the workers(go routines) for parallel requests
The client connection is created on package initialization, and subsequent requests happening in parallel fashion shares the same client.
from the above link
QUESTION
In the below sample elasticsearch doument created by the alerting rule, contains 3 comma seperated string of json objects under hits but they are NOT contained in an array [], so in Go unable to parse them.
Can someone help me parse the hits documents
...ANSWER
Answered 2021-Jul-07 at 08:52Concatenated the json string with the array block and was able to Unmarshal it
QUESTION
I am using django-elasticsearch-dsl library a high level client to interact with elasticsearch.
This is my Document.py file
...ANSWER
Answered 2021-May-12 at 12:21I figured out how to explicitly map keyword fields:
In documents.py
QUESTION
I'm trying to implement the following Elasticsearch query using django-elasticsearch-dsl and am having some difficulty
Query
...ANSWER
Answered 2021-Feb-17 at 22:08As the author of elasticsearch-dsl-py
says, you'll need to use nested filters. One option would be:
QUESTION
I would like to save an elasticsearch.Config struct to a JSON file. The code looks like this:
...ANSWER
Answered 2021-Jan-20 at 05:31elasticsearch.Config
contains exported RetryBackoff
field of said type func(int) time.Duration
. By default, json.Marshall
tries to marshal all exported fields and, for obvious reason, fails to do so.
AFAIK, the only way to customize struct fields marshaling is struct tags, and you can not add them to another package type. So the only way I see is to make your own struct with necessary fields from elasticsearch.Config
, fill and then marshal it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install go-elasticsearch
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page