Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch 6.X and 5.x implementation #51

Merged
merged 28 commits into from
Aug 8, 2017
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7133330
Added version property to viewmodel
Jul 21, 2017
d99f192
Add basic elasticsearch 5.X db implementation
Jul 21, 2017
ccf9286
Improved connect, clear and clearAll
Jul 21, 2017
9049346
Fix empty object issue on update
Jul 21, 2017
63af6b2
Fix eslint duplicaed mapping key issue
Jul 21, 2017
238ab37
remove duplicate condition eslint
Jul 24, 2017
3adc845
Upsert functionallity
Jul 24, 2017
2f27227
null check on errors
Jul 24, 2017
2c98c04
fix eslint dependencies and behaviour
Jul 25, 2017
a374922
elasticsearch 6 preparation
Jul 26, 2017
7729442
Further optimizations and sharding settings
Jul 28, 2017
86d4f5b
Added dbType property to repository ( if not custom )
Aug 3, 2017
cd6e2a5
Rename dbType to repositoryType
Aug 3, 2017
2220d07
Elasticsearch settings support, and better indexing
Aug 3, 2017
f1414e0
Update elasticsearch dev dependency ( 13.x.x )
Aug 4, 2017
fb07002
Full test coverage for elasticsearch6 implementation ( supports Elast…
Aug 4, 2017
3977666
Update travis tests to elasticsearch 5.5.1
Aug 4, 2017
283a8d7
Add sudo to travis so Elasticsearch can be started properly
Aug 4, 2017
a0af276
Remove uneeded IDE and NPM 5 files from repository
Aug 4, 2017
12d0e20
Rename const to var for node.js 0.12 compatibility
Aug 4, 2017
15dc099
Syntax fixes to support node.js 0.12
Aug 4, 2017
e06c937
Update README.md
Aug 4, 2017
70813ae
Extended readme
Aug 4, 2017
0b0b18e
Add non brealing settings possibility for mongodb implementation
Aug 7, 2017
c2e9490
Improved settings name and handling, allowing multiple implementation…
Aug 7, 2017
7322ec3
Improve README, document settings
Aug 7, 2017
ab48dcf
Fix mongodb settings
Aug 8, 2017
37e7cae
version comment fix, new model is with null version
Aug 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve README, document settings
nanov committed Aug 7, 2017
commit 7322ec383eee0122b82082baa565864b6023e45c
38 changes: 28 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -199,13 +199,26 @@ For mongodb you can define indexes for performance boosts in find function.

var dummyRepo = repository.extend({
collectionName: 'dummy',
// like that
indexes: [
'profileId',
// or:
{ profileId: 1 },
// or:
{ index: {profileId: 1}, options: {} }
]
// or like that
repositorySettings : {
mongodb: {
indexes: [ // same as above
'profileId',
// or:
{ profileId: 1 },
// or:
{ index: {profileId: 1}, options: {} }
]
}
}
});

## redis
@@ -245,16 +258,21 @@ Additionaly for elasticsearch6 the number of shards, number of replicas, the ref
var dummyRepo = repository.extend({
collectionName: 'dummy',
repositorySettings: {
refresh: 'wait_for', // default is true,
numberOfShards: 3, // default is 1
numberOfReplicas: 4,
indexCreate: {
mappings : { // will be merged with the default ones
properties: {
title: {
type: "text"
}
}
elasticsearch6: {
refresh: 'wait_for', // optional, refresh behaviour on index, default is true ( ie. force index refresh ) https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html
waitForActiveShards: 2 // optional, defaults to 1 ( ie. wait only for primary ) https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#create-index-wait-for-active-shards
index: { // optional applied on index create, https://www.elastic.co/guide/en/elasticsearch/reference/6.x/indices-create-index.html
settings : { // will be merged with the default ones,
number_of_shards: 3, // optional defaults to 1,
number_of_replicas: 1 // optional defaults to 0,
},
mappings : { // optiona will be merged with the default ones,
properties: { // specific properties to not be handled by dynamic mapper
title: {
type: "text"
}
}
}
}
}
}