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

Add deleteAllDocuments , deleteDocuments by query functions . #41

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

AmrSoliman
Copy link

Add deleteAllDocuments , deleteDocuments by query functions . #41

@timgws
Copy link
Member

timgws commented Mar 3, 2016

dontUseTimestampsInIndex has been deprecated for a reason.

It does not make sense to have two functions that do the same thing. Also, consider:

$es->useTimestampsInIndex(false);

Reads much nicer then

$es->dontUseTimestampsInIndex();

and makes it easier to swap around your intent for using timestamps in indexes with a configuration setting, without requiring if statements to call a different function.

With regards to deleteDocuments, if it does not work with Elasticsearch out of the box, then it might be better to put it into a seperate trait which can be added to a model. Elasticquent should not require Elasticsearch plugins to be installed for any of it's 'core' functionality.

It's also important to note that this Elasticsearch plastic is essentially just syntactic sugar for
a scan/scroll search and corresponding bulk-deletes by ID.

See my comment on a related issue here #37

It would be better that instead of requiring a plugin, that we implement the scan/scroll API and do the bulk delete natively.

This would solve the issue of having to require a plugin in Elasticsearch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants