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

Edit Documents with Rhai #4626

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Edit Documents with Rhai #4626

wants to merge 18 commits into from

Conversation

Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented May 9, 2024

This PR introduces a first version of the Update Documents with Function (internal). It uses the Rhai programming language to let users express the modifications they want apply.

You can read more about the way to use this functions on the Usage PRD Page. The prototype is available through Docker by using the following command:

docker run -p 7700:7700 -v $(pwd)/meili_data:/meili_data getmeili/meilisearch:prototype-edit-documents-with-rhai-3

TODO

  • Support the DocumentEdition task in dumps.
  • Remove the unwraps and panics.
  • Improve error codes for the function parameter.
  • Check that the script cannot do any io.
  • Introduce a Documents.edit action or require the Documents.all action.
  • Change the editionCode to the clearer function field name in the tasks.
  • Support a user provided context and maybe more (but keep function execution isolated for reproducibility).
  • Support deleting documents when the doc is () (nil, null).
  • Support canceling document edition.
  • Multithread document edition by using rayon (and rayon-par-bridge).
  • Limit the number of instruction by function execution.
  • Expose the limit of instructions in the settings. Not sure, in fact.
  • Ignore unmodified documents in the tasks count.
  • Make the filter field optional (not forced to be null).

@Kerollmops Kerollmops added the prototype available You can test this feature using the available prototype label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prototype available You can test this feature using the available prototype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant