io.github.honhimw.ms.api.DictionarySettings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of meilisearch-rest-client Show documentation
Show all versions of meilisearch-rest-client Show documentation
Reactive meilisearch rest client powered by reactor-netty-http.
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.github.honhimw.ms.api;
import io.github.honhimw.ms.model.TaskInfo;
import io.swagger.v3.oas.annotations.Operation;
import java.util.List;
/**
* Dictionary
*
* Allows users to instruct Meilisearch to consider groups of strings as a single term by adding a supplementary dictionary of user-defined terms.
*
* This is particularly useful when working with datasets containing many domain-specific words, and in languages where words are not separated by whitespace such as Japanese.
*
* Custom dictionaries are also useful in a few use-cases for space-separated languages, such as datasets with names such as "J. R. R. Tolkien" and "W. E. B. Du Bois".
*
TIP:
* User-defined dictionaries can be used together with synonyms. It can be useful to configure Meilisearch so different spellings of an author's initials return the same results:
*
* {
* "dictionary": ["W. E. B.", "W.E.B."],
* "synonyms": {
* "W. E. B.": ["W.E.B."],
* "W.E.B.": ["W. E. B."]
* }
* ...
* }
*
*
* @author hon_him
* @since 2024-01-03
*/
public interface DictionarySettings {
/**
* Get an index's user-defined dictionary.
*
* @return current index dictionary settings
*/
@Operation(method = "GET", tags = "/indexes/{index_uid}/settings/dictionary")
List get();
/**
* Update an index's user-defined dictionary.
*
* @param dictionary override dictionary settings
* @return update task
*/
@Operation(method = "PUT", tags = "/indexes/{index_uid}/settings/dictionary")
TaskInfo update(List dictionary);
/**
* Reset an index's dictionary to its default value, [].
*
* @return reset task
*/
@Operation(method = "DELETE", tags = "/indexes/{index_uid}/settings/dictionary")
TaskInfo reset();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy