Skip to content

Implement sub-settings methods#264

Merged
bors[bot] merged 10 commits intomeilisearch:mainfrom
ezienecker:feature/240-add-sub-settings
Oct 27, 2021
Merged

Implement sub-settings methods#264
bors[bot] merged 10 commits intomeilisearch:mainfrom
ezienecker:feature/240-add-sub-settings

Conversation

@ezienecker
Copy link
Copy Markdown

Implement the following sub-settings methods:

  • Synonyms
  • Stop-words
  • Searchable attributes
  • Displayed attributes
  • Attributes for faceting
  • Distinct attribute

@ezienecker
Copy link
Copy Markdown
Author

I already see some logs are broken (in the rebase process I did not pay enough attention)

@ezienecker
Copy link
Copy Markdown
Author

I correct the method documentation.

Copy link
Copy Markdown
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

Thanks, @ezienecker for this PR!
I made some suggestions.
I will open a new issue to send null to all the settings in the test see. And another to add the new methods to the .code-samples.meilisearch.yaml file except if you want to make one of them in this PR.

*
* @param uid Index identifier
* @return ranking rules settings of a given uid as String
* @return A Map that contains all synonyms and their associated words
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There seems to be an exchange between the description of synonyms and rankings rules

Suggested change
* @return A Map that contains all synonyms and their associated words
* @return an array of strings that contains the ranking rules settings

* https://docs.meilisearch.com/reference/api/synonyms.html#get-synonyms
*
* @param uid Index identifier
* @return ranking rules settings of a given uid as String
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Exchange with rankings rules?

Suggested change
* @return ranking rules settings of a given uid as String
* @return a Map that contains all synonyms and their associated words

* https://docs.meilisearch.com/reference/api/stop_words.html#get-stop-words
*
* @param uid Index identifier
* @return An array of strings that contains the stop-words.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @return An array of strings that contains the stop-words.
* @return an array of strings that contains the stop-words

* https://docs.meilisearch.com/reference/api/stop_words.html#update-stop-words
*
* @param uid Index identifier
* @param stopWords An array of strings that contains the stop-words
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param stopWords An array of strings that contains the stop-words
* @param stopWords an array of strings that contains the new stop-words settings

* https://docs.meilisearch.com/reference/api/searchable_attributes.html#update-searchable-attributes
*
* @param uid Index identifier
* @param searchableAttributes An array of strings that contains the stop-words.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param searchableAttributes An array of strings that contains the stop-words.
* @param searchableAttributes an array of strings that contains the new searchable attributes settings

* https://docs.meilisearch.com/reference/api/filterable_attributes.html#get-filterable-attributes
*
* @param uid Index identifier
* @return filterable attributes settings of a given uid as String
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @return filterable attributes settings of a given uid as String
* @return an array of strings that contains the filterable attributes settings

* https://docs.meilisearch.com/reference/api/distinct_attribute.html#get-distinct-attribute
*
* @param uid Index identifier
* @return distinct attribute field of a given uid as String
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @return distinct attribute field of a given uid as String
* @return a string of the distinct attribute field

* https://docs.meilisearch.com/reference/api/synonyms.html#update-synonyms
*
* @param uid Index identifier
* @param synonyms the data that contains the new settings
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param synonyms the data that contains the new settings
* @param synonyms a Map that contains the new synonyms settings

* https://docs.meilisearch.com/reference/api/synonyms.html#get-synonyms
*
* @param uid Index identifier
* @return ranking rules settings of a given uid as String
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It should be the synonyms instead of rankings rules

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you copy the same description than in the src/main/java/com/meilisearch/sdk/SettingsHandler.java file?

* https://docs.meilisearch.com/reference/api/synonyms.html#update-synonyms
*
* @param uid Index identifier
* @param synonyms the data that contains the new ranking rules settings
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It should be synonyms instead of ranking rules

@alallema
Copy link
Copy Markdown
Contributor

Hi @ezienecker,
The end of Hacktoberfest is at the end of the week so I'll add the hacktoberfest-accepted label in case it's not merged before

@ezienecker
Copy link
Copy Markdown
Author

Hi @alallema, I have now incorporated the comments so far. Thanks for putting the hacktoberfest-accepted label ;)
Yes, it makes sense to open a new ticket for the documentation. I am currently very stressed by the university again.

Copy link
Copy Markdown
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

LGTM!

Thanks again @ezienecker for all your PR in Meilisearch!

@alallema
Copy link
Copy Markdown
Contributor

bors merge

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Oct 27, 2021

Build succeeded:

@bors bors bot merged commit bfc6e5a into meilisearch:main Oct 27, 2021
@alallema alallema linked an issue Oct 28, 2021 that may be closed by this pull request
7 tasks
@alallema alallema added the enhancement New feature or request label Nov 18, 2021
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.

Implement sub-settings methods

2 participants