org.carrot2.source
Class MultipageSearchEngine.SearchRange

java.lang.Object
  extended by org.carrot2.source.MultipageSearchEngine.SearchRange
Enclosing class:
MultipageSearchEngine

protected static final class MultipageSearchEngine.SearchRange
extends Object

A single result window to fetch.


Field Summary
 int results
          How many results to fetch.
 int start
          Start index from which to search (inclusive).
 
Constructor Summary
MultipageSearchEngine.SearchRange(int start, int results)
          Create a new search range.
 
Method Summary
static MultipageSearchEngine.SearchRange[] getSearchRanges(int start, int results, int maxIndex, int resultsPerPage, boolean incrementByPage)
          Given an unconstrained start and results count, adjust it to the allowed window and split into page buckets if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

public final int start
Start index from which to search (inclusive).


results

public final int results
How many results to fetch.

Constructor Detail

MultipageSearchEngine.SearchRange

public MultipageSearchEngine.SearchRange(int start,
                                         int results)
Create a new search range.

Parameters:
start - Start index of the first result to return (0-based).
results - The number of results to return. The actual number of results returned by a search service may be lower than this number.
Method Detail

getSearchRanges

public static MultipageSearchEngine.SearchRange[] getSearchRanges(int start,
                                                                  int results,
                                                                  int maxIndex,
                                                                  int resultsPerPage,
                                                                  boolean incrementByPage)
Given an unconstrained start and results count, adjust it to the allowed window and split into page buckets if necessary.



Copyright (c) Dawid Weiss, Stanislaw Osinski