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] Define fields to search on at search-time (attributesToSearchOn) #499

Closed
3 tasks
brunoocasali opened this issue Aug 8, 2023 · 0 comments · Fixed by #510
Closed
3 tasks

[v1.3] Define fields to search on at search-time (attributesToSearchOn) #499

brunoocasali opened this issue Aug 8, 2023 · 0 comments · Fixed by #510
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@brunoocasali
Copy link
Member

brunoocasali commented Aug 8, 2023

⚠️ This issue is generated, it means the examples and the namings do not necessarily correspond to the language of this repository.
Also, if you are a maintainer, please add any clarification and instructions about this issue.

Sorry if this is already wholly/partially implemented. Feel free to let me know about the state of this issue in the repo.

Related to meilisearch/integration-guides#280


This issue is divided into two sections, first, you need to make the implementation, and second, you must update the code-samples (no one likes outdated docs, right?).

New implementation

Related to:

Add support for receiving a new key, attributesToSearchOn (an array of field names), to enable running searches over a subset of searchableAttributes without modifying Meilisearch’s index settings.

Code samples

Inside of this file: .code-samples.meilisearch.yml:

  1. Create a new entry with this key search_parameter_guide_attributes_to_search_on_1 containing a call to the search method using the new behavior from the index movies using attributesToSearchOn with an array of one string ["overview"].
    Add a new code sample to the .code-samples.meilisearch.yml file:

Use this as a reference if the previous description was not helpful:

search_parameter_guide_attributes_to_search_on_1: |-
  POST 'http://localhost:7700/indexes/movies/search' 
  with data: { 
    "q": "adventure", "attributesToSearchOn": ["overview"] 
  }   

TODO:

  • Add the ability to receive a new param in the search method called attributesToSearchOn.
  • Add integration tests
  • Update the code-samples accordingly
@brunoocasali brunoocasali added good first issue Good for newcomers enhancement New feature or request labels Aug 8, 2023
brendon-shf added a commit to super-hi-fi/meilisearch-rust that referenced this issue Sep 2, 2023
@meili-bors meili-bors bot closed this as completed in d74e2bb Sep 12, 2023
meili-bors bot added a commit that referenced this issue Sep 12, 2023
519: Update version for v0.24.2 r=curquiza a=curquiza

## 🚀 Enhancements

* Re-export public structures for better import path (#493) `@adriantombu`
* Added function for sending NDJSON documents (#494) `@carlosb1`
* Add missing startedAt field in EnqueuedTask (#485) `@sebastiantoh`
* #499 (attributesToSearchOn) (#510) `@brendon-shf`
* Add total field to get-tasks route (#509) `@hmacr`
* Implement client for experimental-features API (#516) `@hmacr`


Co-authored-by: curquiza <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant