# Keyword
# Description
The keyword configuration is a configurable list of words that are used in order to filter a user's search in the search engine. It can be used to filter out unnecessary words that add no meaning to the sentence in order to narrow down which parts of the search term need to be used in order to produce results. It can also associate words with other words. e.g. air cooling can be associated with ac or Air conditioning so when ac is put in the search it is transformed into air cooling. And it can be used to filter out word separators.
This section is used when using a keyword q= query and will remove
unneeded words from the keyword query in order to gather proper
information about possible items you want to search for.
There are three main sections for keywords
- StopWords
- Synonyms
- WordSeparators
# StopWords
Stop words include words that do not add much to a sentence and can be filtered out in a search in order to narrow down what is actually needed to search for. In order to add a stop word, just insert it into the list, the order does not matter.
# Synonyms
Synonyms refer to list of synonyms and their counterparts. e.g.
"one owner": [
"1st owner",
"first owner",
"1 owner",
"single owner"
]
Where any of these can be searched into the search bar and it will filter them as meaning the same thing. However, referring to the example 1 owner now means one owner, 1 owner is no longer searchable in the dataset as it will always be converted to one owner, meaning that the client has to reflect that transformation in their dataset.
# Word Separators
This is simply a list of non-word items such as spaces, brackets, and hyphens.
# Configuration Full Example
{
"DefaultKeywordIndexOptions": {},
"KeywordIndexOptions": {
"BooksAll": {
"StopWords": [
"sale",
"a",
"about",
"above",
"across",
"after",
"afterwards",
"again",
"against",
"all",
...
],
"Synonyms": {
"Final Fantasy": [
"ff",
"FinalFantasy"
],
"Lord of the Rings": [
"lotr",
"Lord ot Rings"
]
},
"WordSeparators": [
" ",
"\n",
"\r",
"/",
"\\",
"(",
")",
",",
"."
]
}
}
}
