Enums
Enumeration: KlevuTypeOfSearch
14min
@klevu/core / @klevu/core docid 7vdpes 8 0tv 43dya7ly / klevutypeofsearch table of contents enumeration members enumeration klevutypeofsearch docid 3fsfdwgnkdoxmw8q6aiu3enumeration klevutypeofsearch docid 3fsfdwgnkdoxmw8q6aiu3enumeration klevutypeofsearch docid 3fsfdwgnkdoxmw8q6aiu3enumeration klevutypeofsearch docid 3fsfdwgnkdoxmw8q6aiu3enumeration klevutypeofsearch docid 3fsfdwgnkdoxmw8q6aiu3enumeration klevutypeofsearch docid 3fsfdwgnkdoxmw8q6aiu3enumeration klevutypeofsearch docid 3fsfdwgnkdoxmw8q6aiu3 enumeration members and • and = "and" all of the exact words of a query must be found in a record for it to be included in the results no fuzziness or wildcards are included for example a search for "hooded jacket" will only return records which contain the exact terms "hooded" and "jacket" defined in models/klevutypeofsearch ts 64 https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/models/klevutypeofsearch ts#l64 default • default = "default" when this value is specified, klevu will go through a number of attempts to find matching records the first type attempted is wildcard and if there aren't any results found, klevu tries to find products with the fuzzy and query type as long as no matches are found, klevu will continue to fire different query types in the following order wildcard and fuzzy and wildcard or fuzzy or note that when a search term only contains a single word, or more than six words, the 'or' query types will be skipped defined in models/klevutypeofsearch ts 18 https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/models/klevutypeofsearch ts#l18 fuzzyand • fuzzyand = "fuzzy and" this is the same as a wildcard and query, however a certain amount of 'fuzziness' is allowed to account for spelling mistakes for example, if the searched query contains spelling mistakes like "hooder jakcet", klevu will still be able to match any records containing the words "hooded" and "jacket" defined in models/klevutypeofsearch ts 37 https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/models/klevutypeofsearch ts#l37 fuzzyor • fuzzyor = "fuzzy or" this is the same as a wildcard or query, however a certain amount of 'fuzziness' is allowed to account for spelling mistakes for example, if the searched query contains spelling mistakes like "hooder jakcet", klevu will still be able to match any records containing the words "hooded" or "jacket" defined in models/klevutypeofsearch ts 56 https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/models/klevutypeofsearch ts#l56 or • or = "or" at least one exact word of a query must be found in a record for it to be included in a results no fuzziness or wildcards are included for example a search for "hooded jacket" will only return records which contain one of the exact terms "hooded" or "jacket" defined in models/klevutypeofsearch ts 72 https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/models/klevutypeofsearch ts#l72 wildcardand • wildcardand = "wildcard and" this is an 'and' query so all words of the query must be found somewhere in a record for it to be included in the results the last word of the query will have a wildcard suffix appended for example, if the searched query is "hooded jacket", this will become "hooded jacket ", ie klevu will try to find records containing the word "hooded" and any words beginning with "jacket" defined in models/klevutypeofsearch ts 28 https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/models/klevutypeofsearch ts#l28 wildcardor • wildcardor = "wildcard or" this is an 'or' query so at least one of the words in the query must be found somewhere in a record for it to be included in the results the last word of the query will have a wildcard suffix appended for example, if the searched query is "hooded jacket", this will become "hooded jacket ", ie klevu will try to find records containing the word "hooded" or any words beginning with "jacket" defined in models/klevutypeofsearch ts 47 https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/models/klevutypeofsearch ts#l47