Skip to content

Commit

Permalink
ISPN-14194 Document query default max results
Browse files Browse the repository at this point in the history
Co-authored-by: Dominika Vagnerova <dvagnero@redhat.com>
  • Loading branch information
fax4ever and domiborges committed Oct 17, 2022
1 parent 349f959 commit 09d6bbf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions documentation/src/main/asciidoc/topics/ref_query_ickle.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ conjunction with `Query.startOffset(long startOffset)` to achieve pagination of
Query<Book> query = queryFactory.create("FROM org.infinispan.sample.Book WHERE title like '%clustering%' ORDER BY year").startOffset(20).maxResults(10)
----

[NOTE]
====
If you don't explicitly set the `maxResults` for a query instance, {brandname} limits the number of results returned by the query to `100`.
You can change the default limit by setting the `query.default-max-results` cache property.
====

== Number of hits

The `QueryResult` object has the `.hitCount()` method to return the total number of results of the query, regardless
Expand Down
6 changes: 6 additions & 0 deletions documentation/src/main/asciidoc/topics/upgrading.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ Any annotations will simply be copied as comments to the generated `.proto` file

The `filesystem-realm`, an experimental feature which has never been documented, has been removed.

== Query efficiency

The default for maximum results returned by a query that was present in Infinispan 12.1.5.Final and earlier versions has been restored.
You can now change the default limit by setting the default-max-results cache property.
The default value of default-max-results is 100.
Limiting the number of results returned by a query significantly improves performance of queries that don't have an explicit limit set.

= Upgrading from 12.1 to 13.0

Expand Down

0 comments on commit 09d6bbf

Please sign in to comment.