documentation
documentation copied to clipboard
Add comparison of implicit vs. explicit index creation
In the main concept guide, we should definitely add an implicit vs. explicit comparison section similar to MongoDB's.
- Implicit: default option, simple, less code.
- Explicit: much more error-proof. This is because implicit index creation is actually two actions (1. Create index, 2. Add documents to said index) tied to one command (add documents). Unlike all other actions in MeiliSearch which are atomic, it is possible for only one of these two actions to complete successfully (index is created, but documents are not added). This can cause errors or missing documents.
Inspired by #583
"Merging" this issue with #1043. Relevant bits of the discussion there:
In the documents core concept it would be interesting to explain that when you add documents in an index that does not exist, the index will be created automatically.
In
indexes
core concept it could be an idea to talk about the implicit index creation. Apparently not onlyPOST /documents
creates the index in the background.
the index creation part seems like a good place.