jbdemonte / mongoose-elasticsearch-xp

A mongoose plugin that indexes models into Elasticsearch 2 / 5 / 6 and 7
92 stars 34 forks source link

feat: add indexAutomatically option to disable middleware hooks #50

Closed florianbepunkt closed 5 years ago

florianbepunkt commented 5 years ago

closes #49

indexAutomatically option is set to true by default. when set to false, middleware hooks are not fired which allows for more fine grained control over when a document should be indexed/removed

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.05%) to 91.949% when pulling ea3a5b692b5c92ff19b73b7319c75aa8fdeea046 on florianbepunkt:master into 09216b4be313bb13d07e067c09412196cca1eed2 on jbdemonte:master.

nodkz commented 5 years ago

Please rename option to onlyOnDemandIndexing and add info about it to README.

Thanks.

nodkz commented 5 years ago

FYI You also may use Filtered Indexing https://github.com/jbdemonte/mongoose-elasticsearch-xp#filtered-indexing. When some field in model has proper values, then doc be send or removed from ES index.

nodkz commented 5 years ago

Make proper changes myself directly to master

nodkz commented 5 years ago

@florianbepunkt thanks for PR

nodkz commented 5 years ago

@florianbepunkt Version 5.6.0 was just published to npm. Please try it with your app.

florianbepunkt commented 5 years ago

Will do so this week. Thank you.

On Mon, Oct 29, 2018 at 3:31 PM Pavel Chertorogov notifications@github.com wrote:

@florianbepunkt https://github.com/florianbepunkt Version 5.6.0 was just published to npm. Please try it with your app.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jbdemonte/mongoose-elasticsearch-xp/pull/50#issuecomment-433931906, or mute the thread https://github.com/notifications/unsubscribe-auth/AH7dWsj6l89ja2kvOmZyQONOsQPh173uks5upxE4gaJpZM4X9Zv8 .

florianbepunkt commented 5 years ago

@nodkz Working great, thank you