Bug 1035635 - Example 5.5. Defining pagination for a search query should be improved
Summary: Example 5.5. Defining pagination for a search query should be improved
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Documentation
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 6.2.0
Assignee: Misha H. Ali
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-28 08:55 UTC by Vitalii Chepeliuk
Modified: 2014-01-16 00:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Build Name: 14318, Infinispan Query Guide-6.2-1 Build Date: 28-11-2013 16:34:04 Topic ID: 14305-505960 [Latest]
Last Closed: 2014-01-16 00:02:00 UTC
Type: Bug


Attachments (Terms of Use)

Description Vitalii Chepeliuk 2013-11-28 08:55:25 UTC
Title: Pagination

Describe the issue:
Example 5.5. Defining pagination for a search query

org.hibernate.Query fullTextQuery = 
    fullTextSession.createFullTextQuery( luceneQuery, Customer.class );
fullTextQuery.setFirstResult(15); //start from the 15th element
fullTextQuery.setMaxResults(10); //return 10 elements

Suggestions for improvement:
CacheQuery cacheQuery = Search.getSearchManager(cache).getQuery(luceneQuery, Customer.class);
cacheQuery.firstResult(15); //start from the 15th element
cacheQuery.maxResults(10); //return 10 elements

and
fulltextQuery.getResultSize()
should be changed to
cacheQuery.getResultSize()

Additional information:

Comment 3 Misha H. Ali 2014-01-16 00:02:00 UTC
The fix for this bug is now generally released and available here:

https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Data_Grid/6.2/index.html


Note You need to log in before you can comment on or make changes to this bug.