package org.dspace.search;

import java.util.List;

public class QueryResults
{
    private int hitCount;       // total hits returned by search engine
    private int start;          // offset of query 'page'
    private int pageSize;       // max number of hits returned

    private List hitHandles;    // handles of content (items, collections, communities)
    private List hitTypes;      // Integers from Constants defng types of corresponding handles 

    /** set total number of hits found by search engine, not number in hitHandles */
    public void setHitCount( int newCount ) { hitCount = newCount; }
    
    /** get total number of hits found by search engine, not just number of returned results */
    public int  getHitCount() { return hitCount; }
    
    /** set start of 'page' of results */
    public void setStart( int newStart ) { start = newStart; }

    /** get start of 'page' of results */
    public int getStart() { return start; }
    
    /** set length of 'page' of results */
    public void setPageSize( int newSize ) { pageSize = newSize; }

    /** get length of 'page' of results */
    public int getPageSize() { return pageSize; }

    /** set the List of handles corresponding to hits */
    public void setHitHandles( List myHits ) { hitHandles = myHits; }
    
    /** get the List of handles corresponding to hits */
    public List getHitHandles() { return hitHandles; }

    /** set the List of types corresponding to handles */
    public void setHitTypes( List newTypes ) { hitTypes = newTypes; }
    
    /** get the List of types corresponding to handles */
    public List getHitTypes() { return hitTypes; }
}

package org.dspace.search;

import java.util.List;

public class QueryResults
{
    private int hitCount;       // total hits returned by search engine
    private int start;          // offset of query 'page'
    private int pageSize;       // max number of hits returned

    private List hitHandles;    // handles of content (items, collections, communities)
    private List hitTypes;      // Integers from Constants defng types of corresponding handles 

    private String errorMsg;    //error string, if there is one
    
    /** set total number of hits found by search engine, not number in hitHandles */
    public void setHitCount( int newCount ) { hitCount = newCount; }
    
    /** get total number of hits found by search engine, not just number of returned results */
    public int  getHitCount() { return hitCount; }
    
    /** set start of 'page' of results */
    public void setStart( int newStart ) { start = newStart; }

    /** get start of 'page' of results */
    public int getStart() { return start; }
    
    /** set length of 'page' of results */
    public void setPageSize( int newSize ) { pageSize = newSize; }

    /** get length of 'page' of results */
    public int getPageSize() { return pageSize; }

    /** set the List of handles corresponding to hits */
    public void setHitHandles( List myHits ) { hitHandles = myHits; }
    
    /** get the List of handles corresponding to hits */
    public List getHitHandles() { return hitHandles; }

    /** set the List of types corresponding to handles */
    public void setHitTypes( List newTypes ) { hitTypes = newTypes; }
    
    /** get the List of types corresponding to handles */
    public List getHitTypes() { return hitTypes; }

    /** set error message */
    public void setErrorMsg( String msg ) { errorMsg = msg; }
    
    /** get error message */
    public String getErrorMsg() { return errorMsg; }

}

Fix for bug 810757. Added errorMsg member variable to allow error messages generated during Lucene search to be communicated to JSP's.