Interface SearchKeywords

All Known Implementing Classes:
SearchKeywordsImpl

public interface SearchKeywords

Search keywords are primarily used by the suggester but are also considered for the full-text search. SearchKeywords is a JSON object where the keys are of IETF language tag. The value to a language tag key is an array of SearchKeyword for the specific language.

{
    "en": [
      { "text": "Multi tool" },
      { "text": "Swiss Army Knife", "suggestTokenizer": { "type": "whitespace" } }
    ],
    "de": [
      {
        "text": "Schweizer Messer",
        "suggestTokenizer": {
          "type": "custom",
          "inputs": ["schweizer messer", "offiziersmesser", "sackmesser"]
        }
      }
    ]
  }
  

Example to create an instance using the builder pattern

     SearchKeywords searchKeywords = SearchKeywords.builder()
             .plus/^[a-z]{2}(-[A-Z]{2})?$/(/^[a-z]{2}(-[A-Z]{2})?$/Builder -> /^[a-z]{2}(-[A-Z]{2})?$/Builder)
             .build()