MimirIndex class abstract

Represents an index in mimir (and also milli, the engine of Meilisearch)

An index consists of documents, which is what searching is based off of

Constructors

MimirIndex()

Properties

documents Stream<List<MimirDocument>>
A stream of all documents from this index
no setter
hashCode int
The hash code for this object.
no setterinherited
name String
The path-friendly name (id) of this index
no setter
numberOfDocuments Future<int>
Returns the number of documents in this index. Useful for pagination or infinite scroll.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDocument(MimirDocument document) Future<void>
Adds the given document to the index
addDocuments(List<MimirDocument> documents) Future<void>
Adds the given documents to the index
close() Future<void>
Close any resources in use by the index. Any streams in use will be closed as a result of calling this method. You probably should not call this unless you know what you are doing.
deleteAllDocuments() Future<void>
Deletes all documents in the index
deleteDocument(String id) Future<void>
Deletes the given document from the index
deleteDocuments(List<String> ids) Future<void>
Deletes the documents with the given ids from the index
getAllDocuments() Future<List<MimirDocument>>
Gets all documents from the index
getDocument(String id) Future<MimirDocument?>
Gets the given document from the index, if it exists
getSettings() Future<MimirIndexSettings>
Gets the settings of this index
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Perform a search against the documents of this index.
searchStream({String? query, Filter? filter, List<SortBy>? sortBy, int? resultsLimit, int? offset, TermsMatchingStrategy? matchingStrategy}) Stream<List<MimirDocument>>
This is the same as search, but instead returns a Stream that can be used to listen to the changes in a search from document modifications.
setDocuments(List<MimirDocument> documents) Future<void>
Replaces all documents in the index with the given documents
setSettings(MimirIndexSettings settings) Future<void>
Sets the settings of this index
toString() String
A string representation of this object.
inherited
updateSettings({String? primaryKey, List<String>? searchableFields, List<String> filterableFields, List<String> sortableFields, List<String> rankingRules, List<String> stopWords, List<Synonyms> synonyms, bool typosEnabled, int minWordSizeForOneTypo, int minWordSizeForTwoTypos, List<String> disallowTyposOnWords, List<String> disallowTyposOnFields}) Future<void>
Updates the settings of this index

Operators

operator ==(Object other) bool
The equality operator.
inherited