Interface Limit<T>
- Type Parameters:
T-
- All Superinterfaces:
Executor<T>
- All Known Subinterfaces:
Filter<T>,OrderByFieldOrLimit<T>,OrderByOperation<T>,Query<T>,ScoredFilter<T>
- API:
- This is a public API.
-
Method Summary
-
Method Details
-
limit
Limits the result to the given sizeExample:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .limit(100) .execute() .getAll();If you do not specify a limit then the maximum number of results that are returned is 10.
The value of parameter
sizemust be smaller than the value of the index settingindex.max_result_window(default value is 10000). If you specify a higher value you will receive an error.- Parameters:
size- the maximum number of results to return.sizemust be smaller thanindex.max_result_window- Returns:
- execute operation
- See Also:
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
limit
Limits the result to the given from position and sizeExample:
import workflow.business.data.Dossier; List<Dossier> result = ivy.repo.search(Dossier.class) .limit(900, 100) .execute() .getAll();If you do not use a limit method then the maximum number of results that are returned is 10.
The value of parameter
fromplus the value of parametersizemust be smaller than the value of the index settingindex.max_result_window(default value is 10000). If you specify higher values you will receive an error.- Parameters:
from- the start index of the first result to return.from+sizemust be smaller thanindex.max_result_windowsize- the maximum number of results to return.from+sizemust be smaller thanindex.max_result_window- Returns:
- execute operation
- See Also:
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-