pub struct Options {Show 14 fields
pub kind: IndexKind,
pub force_remove: bool,
pub proximity_threshold: f32,
pub proximity_algorithm: Algorithm,
pub word_count_limit: usize,
pub response_hits_limit: usize,
pub distance_threshold: usize,
pub clear_interval: Duration,
pub query_max_length: usize,
pub query_max_terms: usize,
pub additional_paths: Vec<Uri>,
pub ignore_paths: Vec<Uri>,
pub ignore_extensions: Vec<String>,
pub index_wordpress_sitemap: bool,
}
Fields§
§kind: IndexKind
The kind of index to use.
force_remove: bool
Forces documents which have been deleted to be removed from the index immediately.
This brings more consistent query times for a bit of performance if the FS is modified often.
Default true
proximity_threshold: f32
The limit of word proximity to accept as “close enough”.
Between [0..1], where 1 is the exact word, and 0 is basically everything.
Default: 0.85
proximity_algorithm: Algorithm
Which proximity algorithm to use.
word_count_limit: usize
The limit of different words where it will only search for proximate words which start with
the same char
.
Default: 2_500
response_hits_limit: usize
Max number of hits to respond with.
Does not improve performance of the searching algorithm.
Default: 50
distance_threshold: usize
Distance of two occurrences where they are considered “next to each other”.
Default: 100
clear_interval: Duration
Interval of clearing of the internal cache.
This greatly improves performance, and stays out of your way, as it clears itself.
Default: 10 minutes
query_max_length: usize
The max length of the input query.
If the length is too large, often many documents are searched, hurting performance.
Default: 100
query_max_terms: usize
The highest number of elipdotter::Part::String
a query can have.
Allowing too many of these slows down the query.
Default: 10
additional_paths: Vec<Uri>
Additional documents to always index.
Only used if you call SearchEngineHandle::index_all
.
Will only be once, at start-up, if they aren’t on the FS.
Only the [Uri::path
] component will be used, so setting this to another domain won’t work
:)
ignore_paths: Vec<Uri>
Always ignore queries which start with any of these [Uri
]s.
Only the [Uri::path
] component will be used.
ignore_extensions: Vec<String>
Ignore these file extensions. This is useful for not indexing images and other media.
Defaults: jpg avif ico png mkv mp4 mp3 m4a wav woff woff2 css js
The strings MUST NOT include .
index_wordpress_sitemap: bool
Index the WordPress-generated sitemap at /sitemap.xml
?
Default: false
Requires features: wordpress-sitemap