org.carrot2.source.MultipageSearchEngineMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of carrot2-core Show documentation
Show all versions of carrot2-core Show documentation
Carrot2 Text Clustering Library
/*
* Carrot2 project.
*
* Copyright (C) 2002-2018, Dawid Weiss, Stanisław Osiński.
* All rights reserved.
*
* Refer to the full license file "carrot2.LICENSE"
* in the root folder of the repository checkout or at:
* http://www.carrot2.org/carrot2.LICENSE
*/
package org.carrot2.source;
/**
* Metadata describing {@link MultipageSearchEngine} characteristics.
*/
public final class MultipageSearchEngineMetadata
{
/**
* Maximum number of results returned per page.
*/
public final int resultsPerPage;
/**
* Maximum reachable result index.
*/
public final int maxResultIndex;
/**
* If false
, the start position of the search is determined by the
* result index, which is the case for most search engines. If true
,
* the start position is determined by the page index.
*/
public final boolean incrementByPage;
/**
* Creates search engine metadata with {@link #incrementByPage} set to
* false
.
*/
public MultipageSearchEngineMetadata(int resultsPerPage, int maxResultIndex)
{
this(resultsPerPage, maxResultIndex, false);
}
public MultipageSearchEngineMetadata(int resultsPerPage, int maxResultIndex,
boolean incrementByPage)
{
this.incrementByPage = incrementByPage;
this.maxResultIndex = maxResultIndex;
this.resultsPerPage = resultsPerPage;
}
}