LiteCore
Couchbase Lite cross-platform core implementation
Loading...
Searching...
No Matches
Data Fields
C4IndexOptions Struct Reference

Options for indexes; these each apply to specific types of indexes. More...

#include <c4IndexTypes.h>

Data Fields

const char * language
 Dominant language of text to be indexed; setting this enables word stemming, i.e.
 
bool ignoreDiacritics
 Should diacritical marks (accents) be ignored? Defaults to false.
 
bool disableStemming
 "Stemming" coalesces different grammatical forms of the same word ("big" and "bigger", for instance.) Full-text search normally uses stemming if the language is one for which stemming rules are available, but this flag can be set to true to disable it.
 
const char * stopWords
 List of words to ignore ("stop words") for full-text search.
 
C4VectorIndexOptions vector
 Options for vector indexes.
 

Detailed Description

Options for indexes; these each apply to specific types of indexes.

Field Documentation

◆ disableStemming

bool C4IndexOptions::disableStemming

"Stemming" coalesces different grammatical forms of the same word ("big" and "bigger", for instance.) Full-text search normally uses stemming if the language is one for which stemming rules are available, but this flag can be set to true to disable it.

Stemming is currently available for these languages: da/danish, nl/dutch, en/english, fi/finnish, fr/french, de/german, hu/hungarian, it/italian, no/norwegian, pt/portuguese, ro/romanian, ru/russian, s/spanish, sv/swedish, tr/turkish.

◆ ignoreDiacritics

bool C4IndexOptions::ignoreDiacritics

Should diacritical marks (accents) be ignored? Defaults to false.

Generally this should be left false for non-English text.

◆ language

const char* C4IndexOptions::language

Dominant language of text to be indexed; setting this enables word stemming, i.e.

matching different cases of the same word ("big" and "bigger", for instance.) Can be an ISO-639 language code or a lowercase (English) language name; supported languages are: da/danish, nl/dutch, en/english, fi/finnish, fr/french, de/german, hu/hungarian, it/italian, no/norwegian, pt/portuguese, ro/romanian, ru/russian, es/spanish, sv/swedish, tr/turkish. If left null, or set to an unrecognized language, no language-specific behaviors such as stemming and stop-word removal occur.

◆ stopWords

const char* C4IndexOptions::stopWords

List of words to ignore ("stop words") for full-text search.

Ignoring common words like "the" and "a" helps keep down the size of the index. If NULL, a default word list will be used based on the language option, if there is one for that language. To suppress stop-words, use an empty string. To provide a custom list of words, use a string containing the words in lowercase separated by spaces.

◆ vector

C4VectorIndexOptions C4IndexOptions::vector

Options for vector indexes.


The documentation for this struct was generated from the following file: