Example usage for org.apache.solr.client.solrj SolrQuery setStart

List of usage examples for org.apache.solr.client.solrj SolrQuery setStart

Introduction

In this page you can find the example usage for org.apache.solr.client.solrj SolrQuery setStart.

Prototype

public SolrQuery setStart(Integer start) 

Source Link

Usage

From source file:xc.mst.utils.index.ManifestationList.java

License:Open Source License

/**
 * Constructs a ManifestationList around a Solr query. The docs returned by the query
 * are assumed to all be Manifestation Objects
 * //from  w w w .  j  a v a2s .c om
 * @param query
 *            The Solr query for which the ManifestationList was built
 */
public ManifestationList(SolrQuery query) throws IndexException {
    this.query = query;
    query.setRows(MAX_RESULTS);
    query.setStart(currentOffset);
    docs = indexMgr.getDocumentList(query);
}

From source file:xc.mst.utils.index.RecordList.java

License:Open Source License

/**
 * Constructs a RecordList around a Solr query. The docs returned by the query
 * are assumed to all be Record Objects//from  w w w .j  a v a  2  s. c  o  m
 * 
 * @param query
 *            The Solr query for which the RecordList was built
 */
public RecordList(SolrQuery query) throws IndexException {
    if (query != null) {
        this.query = query;
        query.setRows(MAX_RESULTS);
        query.setStart(currentOffset);
        docs = indexMgr.getDocumentList(query);
        size = (int) docs.getNumFound();
    }
}

From source file:xc.mst.utils.index.RecordList.java

License:Open Source License

/**
 * Constructs a RecordList around a Solr query. The docs returned by the query
 * are assumed to all be Record Objects// w w w .  j  a  va2 s .c o m
 * 
 * @param query
 *            The Solr query for which the RecordList was built
 */
public RecordList(SolrQuery query, int numRowsToFetch) throws IndexException {
    if (query != null) {
        this.query = query;
        query.setRows(numRowsToFetch);
        query.setStart(currentOffset);
        docs = indexMgr.getDocumentList(query);
        size = (int) docs.getNumFound();
    }
}

From source file:xc.mst.utils.index.Records.java

License:Open Source License

/**
 * Constructs a RecordList around a Solr query. The docs returned by the query
 * are assumed to all be Record Objects/*from w  w  w .  j av  a  2  s .  c  om*/
 * 
 * @param query
 *            The Solr query for which the RecordList was built
 */
public Records(SolrQuery query) throws IndexException {
    if (query != null) {
        this.query = query;
        query.setRows(MAX_RESULTS);
        query.setStart(currentOffset);
        docs = indexMgr.getDocumentList(query);
        size = (int) docs.getNumFound();
    }
}

From source file:xc.mst.utils.index.Records.java

License:Open Source License

/**
 * Constructs a RecordList around a Solr query. The docs returned by the query
 * are assumed to all be Record Objects//from  w ww .  j  a  v a2s  . c  om
 * 
 * @param query
 *            The Solr query for which the RecordList was built
 */
public Records(SolrQuery query, int numRowsToFetch) throws IndexException {
    if (query != null) {
        this.query = query;
        query.setRows(numRowsToFetch);
        query.setStart(currentOffset);
        docs = indexMgr.getDocumentList(query);
        size = (int) docs.getNumFound();
    }
}

From source file:xc.mst.utils.index.WorkList.java

License:Open Source License

/**
 * Constructs a WorkList around a Solr query. The docs returned by the query
 * are assumed to all be Work Objects/*from www .  j a  va  2 s .  c o m*/
 * 
 * @param query
 *            The Solr query for which the WorkList was built
 */
public WorkList(SolrQuery query) throws IndexException {
    this.query = query;
    query.setRows(MAX_RESULTS);
    query.setStart(currentOffset);
    docs = indexMgr.getDocumentList(query);
}