Comments (4)
That line you linked to pushed the correct value to the toUpsert
array, sure. Which is used with toUpsert[0].refresh
- so yeah that looks fine. But, like I've tried to explain a few times now it looks like it uses the wrong key when passed along to es.bulk:
from dynamodb-stream-elasticsearch.
You can notice that few lines above there is:
toUpsert.push({ index, id, body, refresh })
so the flag is set correctly. If you run tests you will find that:
elasticsearch Starting a new request {
method: 'POST',
path: '/_bulk',
bulkBody: [ { delete: [Object] } ],
querystring: 'refresh=false',
body: '{"delete":{"_index":"test","_id":"russ-wintheiser-c240e6ac-3"}}\n',
headers: {
'user-agent': 'elasticsearch-js/7.7.1 (darwin 20.2.0-x64; Node.js v14.15.3)',
'content-type': 'application/x-ndjson',
'content-length': '64'
},
timeout: 30000
} +154ms
Closing.
from dynamodb-stream-elasticsearch.
That test you did seems to be for delete not upserts, and that looks fine and uses the correct key for es.bulk:
But if you look for upsert es.bulk:
from dynamodb-stream-elasticsearch.
Right, I put a wrong test example. Looking a code bulk uses correct value for refresh:
https://github.com/matrus2/dynamodb-stream-elasticsearch/blob/master/src/index.js#L62
from dynamodb-stream-elasticsearch.
Related Issues (20)
- after update to > 2.3.0 : the type change if not defined HOT 11
- modify items for reordering HOT 7
- Typescript refactor / DefinitelyTyped HOT 1
- Upgrading Elasticsearch client HOT 2
- Error security_exception HOT 3
- Getting error when pushing event from stream HOT 2
- pushStream is incorrectly typed as void function being async HOT 1
- mapper_parsing_exception HOT 1
- Always times out when used with AWS Lambda HOT 1
- mappings overridden
- Bulk won't throw errors HOT 2
- Removal of mapping types
- useBulk missing in streamOptions interface
- Serverless Webpack bundle size HOT 1
- Deleted fields ignored when using useBulk HOT 2
- Not being able to configure auth without aws credentials HOT 6
- Some digits are missing when there is a large number in the N field of a DynamoDB record. HOT 2
- Race condition??
- pushStream does not handle same key INSERT and REMOVE on the same event list HOT 1
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 dynamodb-stream-elasticsearch.