29 questions
0
votes
3
answers
588
views
Inserting numbers (floats) in Elasticsearch with the node client library
I'm trying to insert documents into Elasticsearch, they come as a format like:
{
total: 1,
subtotal: 1.2,
totalDiscount: 0}
The issue I'm having is with the zeroes, in JavaScript you can't ...
5
votes
1
answer
4k
views
How to properly list all elasticsearch indices from node.js
In my node.js app, I'm trying to build a list of all elasticsearch indices and send this list as JSON to my Angular app.
I'm using elasticsearch.js module:
npm install elasticsearch
const ...
2
votes
1
answer
1k
views
How to list ALL indices using elasticsearch.js client
I need to list all indices in my node.js app, using elasticsearch.js node module.
What I have is:
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host: '...
0
votes
1
answer
60
views
Elasticsearch-js has no existing documentation for count(...) - any examples/other docs?
I am using elasticsearch js within my application and have successfully connected and queried data from elastic.
I am now trying to implement the count() method to return the number of documents in ...
3
votes
0
answers
531
views
Where should I put the generated Authorization token in node.js request using elasticsearch.js?
I have successful setup the elasticsearch x-pack security. And I am planning to use the generated token to limit requests.
I generated token following this page:
https://www.elastic.co/guide/en/...
0
votes
1
answer
551
views
how to exclude port number in host in elasticsearch.js client
I need to call my elastic search url without port number from elastisearch.js client from angular5
I need to call the elasticsearch url without port like this
'https://myelasticsearch-api.xyz.com/...
0
votes
1
answer
428
views
Get API in elasticsearch.js
I am using elasticsearch js client and currently I send my requests in such a way:
// my service
function(indexName, docType, payload){
return elasticClient.search({
index: ...
1
vote
0
answers
148
views
Elasticsearch.js term query returns 0 hits with mapping set to "not_analyzed"
I've been trying to search my ES database using the "term" query. I keep getting 0 hits.
Here's my mapping:
function initUserMapping() {
return elasticClient.indices.putMapping({
index: "user",
...
1
vote
1
answer
661
views
ElasticSearchJS with Electron
I'm using elasticsearchjs in a small project using electron. But I somehow encounter something strange that blocks me.
In Electron, I have a button, that triggers a function on a click:
<button ...
0
votes
0
answers
547
views
Get method instead of Post method in elasticsearch.js Client search api
is there a way to search elastic using GET rather than POST method , since i can do this in curl
curl -XGET 'localhost:9200/tvseries/internindex/_search?size=5&from=5&pretty' -H 'Content-Type:...
0
votes
1
answer
638
views
Nodejs stream modification for elasticsearch bulk
i wanted to append below object to every object in stream
{"index":{"_index":"tvseries","_type":"internindex"}}
my stream looks like this
[
{"showname":"The X Files","episode":"04","content":"...
3
votes
1
answer
725
views
ElasticSearch.js search query returns 0 hits, but generated URL contains proper hits
I'm currently writing a website in JavaScript that graphs various fields from data in ElasticSearch, and I've run into a strange issue. (I don't want to use Kibana for a variety of reasons.)
My ...
0
votes
1
answer
113
views
couldn't search integers in elasticsearch
I'm new to elasticsearch, i am using amazon's elasticsearch 5.3.
this is my json data
[
{
"Sl. No.": 5,
"Code No.": "0101.21.00",
"Name of Commodity": "Live Horses"
},
{
"Sl. ...
0
votes
1
answer
1k
views
how do I scan and scroll with elasticsearch-js and elasticsearch 5.0
I was using elasticsearch-scrolltoend as a plugin previously, after upgrading to 5.0 the plugin doesn't seem to work. How can I scan and scroll a large dataset with elasticsearch 5.0?
I also ...
0
votes
0
answers
172
views
What could be the cause for client.ping to return error when using elasticsearch.js?
I wanted to check if elasticsearch.js was connected to the internet.
So I ran client.ping in my production environment as follows.
client.ping({
requestTimeout: 30000,
}, function (error) {
if (...
0
votes
2
answers
1k
views
Elasticsearch.js analyzer error using custom analyzer
Using the latest version of the elasticsearch.js and trying to create a custom path analyzer when indexing and creating the mapping for some posts.
The goal is creating keywords out of each segment ...
1
vote
1
answer
2k
views
Sync elasticsearch on connection with database - nodeJS
Aim: sync elasticsearch with postgres database
Why: sometimes newtwork or cluster/server break so future updates should be recorded
This article https://qafoo.com/blog/...
0
votes
1
answer
142
views
ElasticSearch and searching documents unpredictable
Something very very strange is happening with ES JS Client.
client.search() method seems to work properly, index and search data work correctly, but if a restart the elasticsearch.bat then the client ...
0
votes
1
answer
613
views
Elasticsearch is not using template and mapping while indexing data from Firebase
I have multiple indices to index data from Firebase to Elasticsearch.
I am using client.indices.putTemplate to put template in the elasticsearch. which is successfully getting saved, but the same is ...
1
vote
1
answer
870
views
How to search nested objects on Elasticsearch using elasticsearch.js and Angular
I want to search fields on a nested document on my elasticsearch db. I use the following command to search fields on a nested object (getting 10 inner hits):
curl -X GET 'http://localhost:9200/jira-...
0
votes
1
answer
1k
views
Elasticsearch.js AngularJS autocomplete
I'm trying to implement an autocomplete feature using Elasticsearch, angularJS and bootstrap.
I've got inspired by this solution :
autocomplete/typeahead angularjs bootstrap on elasticsearch
This is ...
1
vote
0
answers
92
views
Issue in Elastic search with range filter
I are working on Elastic Search and trying to fetch data by using aggregation queries from angularjs UI pages, we are using Elasticseach.js, Elastic.js etc plugins for
posting the request and ...
1
vote
0
answers
314
views
Put filtered mustache search template on AWS elasticsearch cluster using javascript API
I'm using the elasticsearch javascript API, 1.5, as currently 1.5 is the latest version of ElasticSearch which AWS elasticsearch supports.
The function in javascript which I am suppose to use works ...
0
votes
2
answers
508
views
Map a book in elasticsearch with many levels, nested vs parent-child relationship
When creating the mappings for an index that can search through multiple books, is it preferable to use nested mappings like below, or using documents with a parent-child relationship
book: {
...
1
vote
1
answer
334
views
Elasticsearch Error: SearchPhaseExecutionException: SearchParseException
I am getting the following error when I try and use a template search on an AWS elasticsearch cluster using the query
"match": { "title": "copyright" }
Parse Failure [Failed to parse source [{\"...
1
vote
1
answer
890
views
Difference between client.indices.putTemplate and client.putTemplate
What is the difference between client.indices.putTemplate and client.putTemplate using the Javascript ElasticSearch Client, Elasticsearch.js
0
votes
0
answers
228
views
Issue getting the latest elasticsearch entry every x seconds
Basically I have multiple log entries going to elasticsearch every couple seconds. I'm trying to write a live streaming log viewer that polls elastic search every say 2 seconds for the most recent 20 ...
0
votes
1
answer
3k
views
elasticsearch.js bulk insert error
I am trying to insert/update data with the javascript elasticsearch client, but I am getting the error:
{
"error": {
"root_cause": [
{
"type": "...
0
votes
1
answer
182
views
Non partial update on elasticsearch node API
As the 2.0 docs say, updates performed are partial - they do not override the whole document but only merge the existing one with the value given.
Is there a way to perform a full update using this ...