searchIncrementally method

Stream<QueryResult> searchIncrementally(
  1. {Query query,
  2. Reach reach = Reach.server}

Searches documents and returns the result as a stream where the snapshot list incrementally grows larger.

Optional argument queryString defines a query string. The syntax is based on Lucene query syntax. For a description of the syntax, see SearchQueryParser.

Optional argument filter defines a filter.

If both queryString and filter are non-null, the database will receive an AndFilter that contains both the parsed filter and the other filter.

Optional argument skip defines how many snapshots to skip in the beginning. The default value is 0.

You should usually give optional argument take, which defines the maximum number of snapshots in the results.

An example:

final stream = database.searchIncrementally(
  query: Query.parse(
    'cat OR dog',
    skip: 0,
    take: 1,


Stream<QueryResult> searchIncrementally({
  Query query,
  Reach reach = Reach.server,
}) {
  return DocumentSearchRequest(
    collection: this,
    query: query,
    reach: reach,