All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.carrot2.source.MultipageSearchEngineMetadata Maven / Gradle / Ivy

There is a newer version: 4.6.0
Show newest version

/*
 * 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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy