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

v1.3: Experimental API route #2482

Closed
2 tasks
guimachiavelli opened this issue Jun 22, 2023 · 7 comments
Closed
2 tasks

v1.3: Experimental API route #2482

guimachiavelli opened this issue Jun 22, 2023 · 7 comments
Milestone

Comments

@guimachiavelli
Copy link
Member

guimachiavelli commented Jun 22, 2023

The engine team is working on creating a new API route to manage experimental features without the need for CLI flags and environment variables. The aim is to make it easier for users to turn experimental features on and off, something which will also benefit Meiliearch's cloud offering.

Not all experimental features will be editable via the new endpoint. We won't havetime to implement an interface for some (e.g. /metrics endpoint), and it is impossible to use the API to manage others (e.g. --experimental-reduce-indexing-memory-usage).

Tasks

  • create new overview page under "Learn > Experimental" presenting experimental features, the experimental API, and which features can be configured via the API
  • create new page under "Reference > API" describing the API route

References

@guimachiavelli
Copy link
Member Author

@dureuill, question:

Changes made to an experimental feature using the API persist between launches. For example, if I activate vector search via the API, that feature will still be active after I interrupt and relaunch an instance.

What happens when changes made via the API conflict with e.g. a cli flag? For example, if I launch Meilisearch with --experimental-vector-search, disable vector search via the API, and relaunch the instance with --experimental-vector-search? I assume the cli flag takes precedence?

@guimachiavelli
Copy link
Member Author

guimachiavelli commented Jun 28, 2023

@dureill, another question on the interaction between experimental options and experimental API.

Do cli flags/env vars mark an experimental feature as active in the API?

For example, if I launch Meilisearch with --experimental-vector-search, then GET query the API, will the response show {"vectorSearch": true}?

@dureuill
Copy link
Contributor

dureuill commented Jun 28, 2023

Hello @guimachiavelli,

We sidestepped this issue by making it so that features that can be toggled at runtime cannot be enabled by a command line flag, a configuration setting or an environment variable.

The PRD states "No CLI/env variable for the corresponding exp features"

@guimachiavelli
Copy link
Member Author

duh, sorry, I missed that. Thanks for pointing it out 🙏

@dureuill
Copy link
Contributor

You're welcome! It was a good question, hence why we decided to not answer it right away in this first iteration

@guimachiavelli
Copy link
Member Author

guimachiavelli commented Jun 28, 2023

Ok, another question, which I hopefully have not missed from the PR nor the PRD.

From what I'm seeing, we have implemented a POST endpoint for this route. Do we have a use case for it?

@dureuill
Copy link
Contributor

hmmm, I think we don't have a good reason to provide a POST endpoint here. I'll check with people that know more about REST than I do

meili-bors bot added a commit to meilisearch/meilisearch that referenced this issue Jun 29, 2023
3699: Search for Facet Values r=dureuill a=Kerollmops

This PR introduces the first version of [the _Search for Facet Values_ feature](https://github.com/meilisearch/product/discussions/515) that allows a user to search for facets, by optionally using a prefix string and optionally specifying the `q` and `filter` original search parameters to restrict the candidates to search in.

The steps to merge it into Meilisearch will first start by providing prototype Docker images. This way users will be able to test the prototypes before using them.

The current route to use the _Search for Facet Values_ feature is the `POST /indexes/{index}/facet-search` where the body is a JSON object that looks like the following:
```json5
{
  "q": "spiderman", // optional
  "filter": "rating > 10", // optional
  "facetName": "genres",
  "facetQuery": "a" // optional
}
```

## What is missing?

 - [x] Send some analytics.
 - [x] Support the `matchingStrategy` parameter.
 - [x] Make sure that the errors are the right ones.
 - [x] Use the [Index typo tolerance settings](https://www.meilisearch.com/docs/learn/configuration/typo_tolerance#minwordsizefortypos) when matching facet values.
    - [x] minWordSizeForTypos.oneTypo
    - [x] minWordSizeForTypos.twoTypo
 - [x] Add tests
 - [x] Log the time it took to compute the results.
 - [x] Fix the compilation warnings.
 - [x] [Create an issue to fix potential performance issues when indexing](#3862).


3864: Remove `/experimental-features` verbs that weren't in the PRD r=Kerollmops a=dureuill

Removes:

- POST `/experimental-features`
- DELETE `/experimental-features`

keeping only:

- PATCH `/experimental-features`
- GET `/experimental-features`

The two routes that are described in the PRD.

Following `@guimachiavelli's` [question](meilisearch/documentation#2482 (comment)) about the POST route.

Co-authored-by: Clément Renault <clement@meilisearch.com>
Co-authored-by: Kerollmops <clement@meilisearch.com>
Co-authored-by: Louis Dureuil <louis@meilisearch.com>
meili-bors bot added a commit to meilisearch/meilisearch that referenced this issue Jun 29, 2023
3864: Remove `/experimental-features` verbs that weren't in the PRD r=dureuill a=dureuill

Removes:

- POST `/experimental-features`
- DELETE `/experimental-features`

keeping only:

- PATCH `/experimental-features`
- GET `/experimental-features`

The two routes that are described in the PRD.

Following `@guimachiavelli's` [question](meilisearch/documentation#2482 (comment)) about the POST route.

Co-authored-by: Louis Dureuil <louis@meilisearch.com>
@guimachiavelli guimachiavelli added this to the v1.3 milestone Jul 31, 2023
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

No branches or pull requests

2 participants