diff --git a/classes/_pacote_bloom_filter.BloomFilter.html b/classes/_pacote_bloom_filter.BloomFilter.html index 99ca8f1c9..59d2a0f8a 100644 --- a/classes/_pacote_bloom_filter.BloomFilter.html +++ b/classes/_pacote_bloom_filter.BloomFilter.html @@ -1,4 +1,4 @@ -
import { BloomSearch } from '@pacote/bloom-search'
const bs = new BloomSearch({
fields: ['text'],
summary: ['id'],
})
bs.add('id1', { id: 1, text: 'foo bar' })
bs.add('id2', { id: 2, text: 'foo baz' })
bs.search('foo +bar') // => [{ id: 1 }])
bs.search('foo -bar') // => [{ id: 2 }])
- Readonly
errorError rate used in all Bloom filters to generate document signatures.
+Readonly
fieldsA record containing the name of all indexable fields and their relative weight used to rank search results.
-Collection containing document summaries and Bloom filter signatures used +
Collection containing document summaries and Bloom filter signatures used to search, with document shorthand reference identifier used as keys.
-Readonly
minMinimum term cardinality used to calculate the Bloom filter size. This can +
Readonly
minMinimum term cardinality used to calculate the Bloom filter size. This can be used to reduce false positives when dealing with small documents with sparse term frequency distribution.
-Readonly
ngramsThe n-grams to store in the index. Defaults to 1
(no n-grams).
Readonly
seedHash seed to use in Bloom Filters, defaults to 0x00c0ffee
.
Readonly
summaryAn array with the names of fields to preserve as summary, and which are +
Readonly
ngramsThe n-grams to store in the index. Defaults to 1
(no n-grams).
Readonly
seedHash seed to use in Bloom Filters, defaults to 0x00c0ffee
.
Readonly
summaryAn array with the names of fields to preserve as summary, and which are returned as search results for the matching documents. It is recommended to keep only fields necessary to identify a document (e.g. title, URL, short description) to keep space requirements down.
-Readonly
termOptimises storage by grouping indexed terms into buckets according to term +
Readonly
termOptimises storage by grouping indexed terms into buckets according to term frequency in a document.
-Indexes a single document with its unique reference identifier.
A unique reference identifier for the document. Adding another document with the same reference replaces the document on the search index.
@@ -43,7 +43,7 @@Optional
language: stringLanguage identifier which is fed back into the
stemmer
and stopwords
callback functions to help
decide how to handle these steps.
Replaces the instance's index with an index from another instance. Its primary use case is to rehydrate the index from a static file or payload.
NB: Calling this method will not change any other attributes in the
instance. It is up to developers to ensure that the instances were
@@ -51,9 +51,9 @@
function. Incompatible stemmer
implementations may cause matches to
not be found in the rehydrated index.
Replacement index.
-Scans the document index and returns a list of documents summaries (with +
Scans the document index and returns a list of documents summaries (with
only the properties declared in the summary
option) that possibly match
one or more terms in the query.
Each search term is run through the provided stemmer
function to ensure
@@ -74,4 +74,4 @@
language.
Ordered list of document summaries, sorted by probable search term frequency.
-
Bloom search options.
-