Comments (7)
@juanpujol - I like what you have and I do think it would have made a valid PR, even if there may have been a little bit of back & forth.
Right now I'm trying to use https://github.com/arielfr/elastic-deletebyquery to make it work, a bit stuck but let's hope I figure it out as it would be a more complete solution. Also am worried about blocking code but lets see.
from loopback-connector-elastic-search.
This is a valid bug, I verified by running tests against v2.x, thanks to @harshadyeola for setting up easy to use docker instructions
Ah, dang! Its deprecated in 1.5.3 according to docs
from loopback-connector-elastic-search.
-
Latest stable version of ES is
2.3.4
as of now and that may be made to work according to this comment:delete-by-query has been implemented using bulk, and moved into a plugin
- If we want to use the plugin approach, then the users with ES need to use the following for
v2.3
etc: https://github.com/elastic/elasticsearch/tree/2.3/plugins/delete-by-query-
From the connector code persepective, we need to update the connector to use https://github.com/dermidgen/elasticsearch-deletebyquery
which is a:
Elasticsearch-js client extension for the Delete-by-query plugin
-
- If we want to use the scroll/scan approach, someone was nice enough to share that too! https://github.com/arielfr/elastic-deletebyquery
- If we want to use the plugin approach, then the users with ES need to use the following for
-
But I think the
master
version of ES tells a different story for the future completely:The Delete-By-Query plugin has been removed in favor of a new Delete By Query API implementation in core. It now supports throttling, retries and cancellation but no longer supports timeouts. Instead use the cancel API to cancel deletes that run too long.
-
And its back again in reference/master docs! Huh?
-
Old(1.5.3) versus SuperNew(master/5.x)
#old DELETE twitter/tweet/_query { "query" : { "term" : { "user" : "kimchy" } } } #super new POST twitter/_delete_by_query { "query": { "match": { "message": "some message" } } }
from loopback-connector-elastic-search.
I added a conditional to the destroyAll
method so it will work with the native delete
using just id from ElasticSearch v2.x.
It should work as long the apiVersion
setting is set to 2.x
.
This works for me but I don't know if should go on a PR.
from loopback-connector-elastic-search.
BTW, it only seems appropriate that I thank both:
- @arielfr for https://github.com/arielfr/elastic-deletebyquery,
- and @dermidgen https://github.com/dermidgen/elasticsearch-deletebyquery
for their separate and novel approach ... without them my research into a possible resolution would not get as far.
from loopback-connector-elastic-search.
@juanpujol - it is done and released in 1.0.7 of this connector, please take it for a spin and reopen this issue if it is not fixed.
Out of the many approaches, I chose to use https://github.com/arielfr/elastic-deletebyquery to make it work which means that scam/scrol is used in tandem with bulk queries to ES v2.x
from loopback-connector-elastic-search.
@pulkitsinghal sorry it took me so long. I tested and it works, thank you!
from loopback-connector-elastic-search.
Related Issues (20)
- Allow SSL CA configuration to be a full path HOT 2
- Misleading log in function buildDeepNestedQueries HOT 1
- Cannot run the example HOT 2
- esv6 automatically create index if not exists HOT 3
- Create 'connected ' event for handling boot script issues HOT 1
- add uniqueness validation for a field, ES-2.4 HOT 2
- Combining geo near queries with multi_match
- Missing function destroyAll() ? HOT 3
- support loopback4 HOT 3
- Support suggest for ES7
- Automigrate : update mapping
- Nested Query Format
- Security: Update lodash dependency
- Connector ignores mapping settings
- Multiple indexes for one datasource
- Loopback4 Suporte
- [BUG] Filters are not working with Special Charactors HOT 1
- The client noticed that the server is not a supported distribution of Elasticsearch HOT 4
- How to implement Bulk upsert
- Updating Elastic Search Connector
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopback-connector-elastic-search.