DVPostgresSearchProvider<TModel, TFacets> class
Search over a PostgreSQL table using its own full-text engine.
The index lives in the database rather than a separate service, which is the point: one datastore to operate, and results that cannot go stale relative to the rows they came from.
- Implemented types
-
- DVSearchProvider<
TModel, TFacets>
- DVSearchProvider<
Constructors
Properties
-
columns
→ List<
String> -
Columns concatenated into the searchable document.
final
- configuration → String
-
The text search configuration, which decides stemming and stop words.
final
- database → DVDatabaseAdapter
-
final
-
filter
→ ({List<
Object?> params, String sql}) Function(TFacets? facets)? -
Extra SQL and parameters narrowing the search — tenant scoping, a
published flag, a facet.
final
-
fromRow
→ TModel Function(Map<
String, Object?> row) -
Rebuilds a model from a result row.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- table → String
-
The table to search.
final
Methods
-
createIndex(
{String? indexName}) → Future< void> - Creates a GIN index over the searchable document.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
String query, {TFacets? facets, int page = 1, int perPage = 20}) → Future< DVSearchResultPage< TModel> > -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited