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

Implement attributesToSearchOn #463

Merged

Conversation

SKeeneCode
Copy link
Contributor

@SKeeneCode SKeeneCode commented Aug 8, 2023

Pull Request

Related issue

Fixes #457

What does this PR do?

  • Implements AttributesToSearchOn in SearchQuery

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a typo in the code-samples and we are ready to go!

.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
@brunoocasali brunoocasali added the enhancement New feature or request label Aug 8, 2023
@SKeeneCode
Copy link
Contributor Author

SKeeneCode commented Aug 8, 2023

Tests work locally but failed in the workflow with the following error:

Failed Meilisearch.Tests.ServerConfigs.BaseUriServer+SearchTests.CustomSearchWithAttributesToSearchOnNoResults [2 ms]
  Error Message:
   Meilisearch.MeilisearchApiError : MeilisearchApiError, Message: Unknown field `attributesToSearchOn`: expected one of `q`, `offset`, `limit`, `page`, `hitsPerPage`, `attributesToRetrieve`, `attributesToCrop`, `cropLength`, `attributesToHighlight`, `showMatchesPosition`, `filter`, `sort`, `facets`, `highlightPreTag`, `highlightPostTag`, `cropMarker`, `matchingStrategy`,

Locally with an instance set up with just:

curl -L https://install.meilisearch.com | sh
./meilisearch

Tests pass in my IDE:

image

I notice the field attributesToSearchOn isn't included in the expect list in the error. Is the workflow spooling up an out of date version @brunoocasali ?

@ahmednfwela
Copy link
Collaborator

ahmednfwela commented Aug 9, 2023

@SKeeneCode you need to change this line to 1.3.0
https://github.com/meilisearch/meilisearch-dotnet/blob/main/.env#L1

@brunoocasali can we change this to latest to grab the latest available meilisearch version ?

@SKeeneCode
Copy link
Contributor Author

SKeeneCode commented Aug 9, 2023

@ahmednfwela thanks for pointing that out ^.^ I've changed it to 1.3.0 but if brunoo says latest is fine I can do change it to that.

@brunoocasali
Copy link
Member

Since v0.30 we have updated this version number, but I don't remember why. Let's change back to latest and if this is not what we expect, then we can go back to v1.3.0 :D

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your contribution!

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented Sep 1, 2023

Build succeeded:

@meili-bors meili-bors bot merged commit b886e8b into meilisearch:main Sep 1, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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