Package org.codelibs.fess.entity
Class SearchRenderData
java.lang.Object
org.codelibs.fess.entity.SearchRenderData
- Direct Known Subclasses:
AdminSearchlistAction.WebRenderData,SearchAction.WebRenderData
Data container for search results rendering.
This class holds all the data needed to render search results in the UI,
including the actual search results, pagination information, facet data,
execution timing, and highlighting parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intTotal number of pages based on record count and page size.protected longTotal number of records matching the search query.protected StringRelation type for the record count (e.g., "eq", "gte").protected StringAdditional highlight parameters to append to URLs.protected longEnding record number for the current page.protected intCurrent page number being displayed.protected longStarting record number for the current page.List of search result documents.protected StringFormatted execution time for the search request.protected booleanFlag indicating whether a next page exists.protected booleanFlag indicating whether a previous page exists.protected FacetResponseFacet response containing aggregated search facets.List of page numbers for pagination navigation.protected intNumber of results per page.protected booleanFlag indicating whether the results are partial due to timeout or other issues.protected StringUnique identifier for this search query session.protected longTime taken to execute the search query in milliseconds.protected longTimestamp when the search request was made.protected StringThe actual search query executed against the search engine. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for creating a new SearchRenderData instance. -
Method Summary
Modifier and TypeMethodDescriptionintGets the total number of pages based on record count and page size.longGets the total number of records matching the search query.Gets the relation type for the record count (e.g., "eq", "gte").Gets additional highlight parameters to append to URLs.longGets the ending record number for the current page.intGets the current page number being displayed.longGets the starting record number for the current page.Gets the list of search result documents.Gets the formatted execution time for the search request.Gets the facet response containing aggregated search facets.Gets the list of page numbers for pagination navigation.intGets the number of results per page.Gets the unique identifier for this search query session.longGets the time taken to execute the search query in milliseconds.longGets the timestamp when the search request was made.Gets the actual search query executed against the search engine.booleanChecks whether a next page exists.booleanChecks whether a previous page exists.booleanChecks whether the results are partial due to timeout or other issues.voidsetAllPageCount(int allPageCount) Sets the total number of pages based on record count and page size.voidsetAllRecordCount(long allRecordCount) Sets the total number of records matching the search query.voidsetAllRecordCountRelation(String allRecordCountRelation) Sets the relation type for the record count (e.g., "eq", "gte").voidsetAppendHighlightParams(String appendHighlightParams) Sets additional highlight parameters to append to URLs.voidsetCurrentEndRecordNumber(long currentEndRecordNumber) Sets the ending record number for the current page.voidsetCurrentPageNumber(int currentPageNumber) Sets the current page number being displayed.voidsetCurrentStartRecordNumber(long currentStartRecordNumber) Sets the starting record number for the current page.voidsetDocumentItems(List<Map<String, Object>> documentItems) Sets the list of search result documents.voidsetExecTime(String execTime) Sets the formatted execution time for the search request.voidsetExistNextPage(boolean existNextPage) Sets whether a next page exists.voidsetExistPrevPage(boolean existPrevPage) Sets whether a previous page exists.voidsetFacetResponse(FacetResponse facetResponse) Sets the facet response containing aggregated search facets.voidsetPageNumberList(List<String> pageNumberList) Sets the list of page numbers for pagination navigation.voidsetPageSize(int pageSize) Sets the number of results per page.voidsetPartialResults(boolean partialResults) Sets whether the results are partial due to timeout or other issues.voidsetQueryId(String queryId) Sets the unique identifier for this search query session.voidsetQueryTime(long queryTime) Sets the time taken to execute the search query in milliseconds.voidsetRequestedTime(long requestedTime) Sets the timestamp when the search request was made.voidsetSearchQuery(String searchQuery) Sets the actual search query executed against the search engine.toString()
-
Field Details
-
documentItems
List of search result documents. -
facetResponse
Facet response containing aggregated search facets. -
appendHighlightParams
Additional highlight parameters to append to URLs. -
execTime
Formatted execution time for the search request. -
pageSize
protected int pageSizeNumber of results per page. -
currentPageNumber
protected int currentPageNumberCurrent page number being displayed. -
allRecordCount
protected long allRecordCountTotal number of records matching the search query. -
allRecordCountRelation
Relation type for the record count (e.g., "eq", "gte"). -
allPageCount
protected int allPageCountTotal number of pages based on record count and page size. -
existNextPage
protected boolean existNextPageFlag indicating whether a next page exists. -
existPrevPage
protected boolean existPrevPageFlag indicating whether a previous page exists. -
currentStartRecordNumber
protected long currentStartRecordNumberStarting record number for the current page. -
currentEndRecordNumber
protected long currentEndRecordNumberEnding record number for the current page. -
pageNumberList
List of page numbers for pagination navigation. -
partialResults
protected boolean partialResultsFlag indicating whether the results are partial due to timeout or other issues. -
searchQuery
The actual search query executed against the search engine. -
queryTime
protected long queryTimeTime taken to execute the search query in milliseconds. -
requestedTime
protected long requestedTimeTimestamp when the search request was made. -
queryId
Unique identifier for this search query session.
-
-
Constructor Details
-
SearchRenderData
public SearchRenderData()Default constructor for creating a new SearchRenderData instance.
-
-
Method Details
-
setDocumentItems
Sets the list of search result documents.- Parameters:
documentItems- The list of search result documents
-
setFacetResponse
Sets the facet response containing aggregated search facets.- Parameters:
facetResponse- The facet response
-
setAppendHighlightParams
Sets additional highlight parameters to append to URLs.- Parameters:
appendHighlightParams- The highlight parameters string
-
setExecTime
Sets the formatted execution time for the search request.- Parameters:
execTime- The formatted execution time string
-
setPageSize
public void setPageSize(int pageSize) Sets the number of results per page.- Parameters:
pageSize- The page size
-
setCurrentPageNumber
public void setCurrentPageNumber(int currentPageNumber) Sets the current page number being displayed.- Parameters:
currentPageNumber- The current page number
-
setAllRecordCount
public void setAllRecordCount(long allRecordCount) Sets the total number of records matching the search query.- Parameters:
allRecordCount- The total record count
-
setAllRecordCountRelation
Sets the relation type for the record count (e.g., "eq", "gte").- Parameters:
allRecordCountRelation- The record count relation
-
setAllPageCount
public void setAllPageCount(int allPageCount) Sets the total number of pages based on record count and page size.- Parameters:
allPageCount- The total page count
-
setExistNextPage
public void setExistNextPage(boolean existNextPage) Sets whether a next page exists.- Parameters:
existNextPage- true if a next page exists
-
setExistPrevPage
public void setExistPrevPage(boolean existPrevPage) Sets whether a previous page exists.- Parameters:
existPrevPage- true if a previous page exists
-
setCurrentStartRecordNumber
public void setCurrentStartRecordNumber(long currentStartRecordNumber) Sets the starting record number for the current page.- Parameters:
currentStartRecordNumber- The starting record number
-
setCurrentEndRecordNumber
public void setCurrentEndRecordNumber(long currentEndRecordNumber) Sets the ending record number for the current page.- Parameters:
currentEndRecordNumber- The ending record number
-
setPageNumberList
Sets the list of page numbers for pagination navigation.- Parameters:
pageNumberList- The page number list
-
setPartialResults
public void setPartialResults(boolean partialResults) Sets whether the results are partial due to timeout or other issues.- Parameters:
partialResults- true if results are partial
-
setQueryTime
public void setQueryTime(long queryTime) Sets the time taken to execute the search query in milliseconds.- Parameters:
queryTime- The query execution time in milliseconds
-
setSearchQuery
Sets the actual search query executed against the search engine.- Parameters:
searchQuery- The search query string
-
setRequestedTime
public void setRequestedTime(long requestedTime) Sets the timestamp when the search request was made.- Parameters:
requestedTime- The request timestamp
-
setQueryId
Sets the unique identifier for this search query session.- Parameters:
queryId- The query identifier
-
getDocumentItems
Gets the list of search result documents.- Returns:
- The list of search result documents
-
getFacetResponse
Gets the facet response containing aggregated search facets.- Returns:
- The facet response
-
getAppendHighlightParams
Gets additional highlight parameters to append to URLs.- Returns:
- The highlight parameters string
-
getExecTime
Gets the formatted execution time for the search request.- Returns:
- The formatted execution time string
-
getPageSize
public int getPageSize()Gets the number of results per page.- Returns:
- The page size
-
getCurrentPageNumber
public int getCurrentPageNumber()Gets the current page number being displayed.- Returns:
- The current page number
-
getAllRecordCount
public long getAllRecordCount()Gets the total number of records matching the search query.- Returns:
- The total record count
-
getAllRecordCountRelation
Gets the relation type for the record count (e.g., "eq", "gte").- Returns:
- The record count relation
-
getAllPageCount
public int getAllPageCount()Gets the total number of pages based on record count and page size.- Returns:
- The total page count
-
isExistNextPage
public boolean isExistNextPage()Checks whether a next page exists.- Returns:
- true if a next page exists
-
isExistPrevPage
public boolean isExistPrevPage()Checks whether a previous page exists.- Returns:
- true if a previous page exists
-
getCurrentStartRecordNumber
public long getCurrentStartRecordNumber()Gets the starting record number for the current page.- Returns:
- The starting record number
-
getCurrentEndRecordNumber
public long getCurrentEndRecordNumber()Gets the ending record number for the current page.- Returns:
- The ending record number
-
getPageNumberList
Gets the list of page numbers for pagination navigation.- Returns:
- The page number list
-
isPartialResults
public boolean isPartialResults()Checks whether the results are partial due to timeout or other issues.- Returns:
- true if results are partial
-
getSearchQuery
Gets the actual search query executed against the search engine.- Returns:
- The search query string
-
getQueryTime
public long getQueryTime()Gets the time taken to execute the search query in milliseconds.- Returns:
- The query execution time in milliseconds
-
getRequestedTime
public long getRequestedTime()Gets the timestamp when the search request was made.- Returns:
- The request timestamp
-
getQueryId
Gets the unique identifier for this search query session.- Returns:
- The query identifier
-
toString
-