http-aws-es | Use the elasticsearch-js client with Amazon ES | AWS library
kandi X-RAY | http-aws-es Summary
kandi X-RAY | http-aws-es Summary
Use the elasticsearch-js client with Amazon ES
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 http-aws-es
http-aws-es Key Features
http-aws-es Examples and Code Snippets
Community Discussions
Trending Discussions on http-aws-es
QUESTION
I am trying to query an AWS ElasticSearch Domain from a Lambda worker.
To do so, I am using http-aws-es and the main javascript client for Elastic Search.
I query documents with the following relevant fields:
- A
ref
field - String - A
status
field - String ENUM (REMOVED
,BLOCKED
,PUBLISHED
,PENDING
,VERIFIED
) - A
field
field - String Array - A
thematics
field - String Array
What I want to achieve is:
- Filter all documents that are not either
PUBLISHED
orVERIFIED
or where theref
field is set - Return the best matches with my
keywwords
argument (string array) relatively to values infield
andthematics
- Sort to put documents with
PUBLISHED
status first - Limit the number of results to 20
I found the more_like_this
operator, and gave it a try. I build step by step my query and the actual version, at least, doesn't return an error, but no documents are returned. It still misses the ref
filter + #3 and #4 from above. Here is the query :
ANSWER
Answered 2020-May-27 at 12:43There are one or two issues in your query (should
inside must
and must_not
inside filter
). Try the simplified query below instead:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install http-aws-es
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