Questions tagged [elasticsearch.js]

ElasticSearch is an Open Source (Apache 2), Distributed, RESTful, Search Engine built on top of Lucene. This tag should be used only for the use of ElasticSearch in JavaScript.

Elasticsearch is an Open Source (under the Apache 2 License), Distributed, RESTful, Search Engine built on top of and developed in .

It is often combined with and ; referred to as .

According to Wikipedia

It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free documents. It is also document oriented and presents a various set of APIs: native Java, HTTP RESTful.

Elastic is the parent company of Elasticsearch the product.

29 questions
3
votes
1 answer

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 elasticsearch = require('elasticsearch'); const client = new…
Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167
3
votes
0 answers

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…
user4816915
  • 123
  • 7
3
votes
1 answer

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 search query in JavaScript has been returning hits…
2
votes
1 answer

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: 'localhost:9200', log: 'trace' }); …
Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167
1
vote
0 answers

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", type: "document", body: { …
Joel Menezes
  • 27
  • 1
  • 5
1
vote
1 answer

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: And the…
Hammerbot
  • 15,696
  • 9
  • 61
  • 103
1
vote
1 answer

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/086_how_to_synchronize_a_database_with_elastic_search.html suggests that I should…
1
vote
1 answer

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-dev/_search?pretty=true' -d ' { "_source" :…
1
vote
0 answers

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 getting the response, everything is working here for me…
1
vote
0 answers

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 given the following template { _source:…
Ryan White
  • 2,366
  • 1
  • 22
  • 34
1
vote
1 answer

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 [{\"match\"{\"title\":\"copyright\"}}]]]; nested: Parse…
1
vote
1 answer

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
Ryan White
  • 2,366
  • 1
  • 22
  • 34
0
votes
3 answers

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 force '0' to be represented as '0.0' or '0.00'. I…
Antonio Terreno
  • 2,835
  • 1
  • 14
  • 9
0
votes
1 answer

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 the index. Here is the simple code snippet:…
lve
  • 307
  • 2
  • 5
  • 15
0
votes
1 answer

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/api1/1.0' but it always appending default port like…
MPPNBD
  • 1,566
  • 4
  • 20
  • 36
1
2