Search in sources :

Example 1 with SearchQueryResult

use of com.couchbase.client.java.search.result.SearchQueryResult in project jnosql-diana-driver by eclipse.

the class DefaultCouchbaseDocumentCollectionManager method search.

@Override
public List<DocumentEntity> search(SearchQuery query) throws NullPointerException {
    requireNonNull(query, "query is required");
    SearchQueryResult result = bucket.query(query);
    Set<String> keys = StreamSupport.stream(result.spliterator(), false).map(SearchQueryRow::id).collect(toSet());
    return convert(keys, bucket);
}
Also used : SearchQueryResult(com.couchbase.client.java.search.result.SearchQueryResult)

Aggregations

SearchQueryResult (com.couchbase.client.java.search.result.SearchQueryResult)1