public class SolrResult extends JsonSimple
An extension of the JsonSimple class specifically to address Solr result documents and shortcut common access.
| Constructor and Description |
|---|
SolrResult(InputStream jsonIn)
Creates SolrResult object from the provided input stream
|
SolrResult(String jsonString)
Creates SolrResult object from the provided string
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,SolrFacet> |
getFacets()
Return the List of SolrFacet objects from this result set.
|
List<String> |
getFieldList(String field)
Search for the indicated field in the results set and return a list
of the values.
|
Integer |
getNumFound()
Return the number of documents found by this result set.
|
Integer |
getQueryTime()
Return the time taken to perform this search
|
List<SolrDoc> |
getResults()
Return the list of documents from this results set wrapped in utility
objects.
|
Integer |
getRows()
Return the number of documents returned by this result set.
|
Integer |
getStartRow()
Return the index of the first row in this result set [getRows()]
compared to number found [getNumFound()].
|
Integer |
getStatus()
Return the status code for the search
|
fromJavaMap, getArray, getBoolean, getInteger, getJsonArray, getJsonObject, getJsonSimpleList, getJsonSimpleMap, getObject, getPath, getString, getStringList, getStringList, getStringList, search, setPropertySubstitution, toJavaList, toJavaMap, toString, toString, writeArray, writeObjectpublic SolrResult(InputStream jsonIn) throws IOException
jsonIn - : The input stream to readIOException - if there was an error during creationpublic SolrResult(String jsonString) throws IOException
jsonString - : The JSON in string formIOException - if there was an error during creationpublic Map<String,SolrFacet> getFacets()
public List<String> getFieldList(String field)
Search for the indicated field in the results set and return a list of the values.
field - : The field to search forpublic Integer getNumFound()
Return the number of documents found by this result set. Note that this is not the same as the number of documents returned [getRows()], which is the current 'page'.
public Integer getQueryTime()
public List<SolrDoc> getResults()
public Integer getRows()
Return the number of documents returned by this result set. Note that this is not the same as the number of documents found [getNumFound()]. This is just the current 'page'.
public Integer getStartRow()
Return the index of the first row in this result set [getRows()] compared to number found [getNumFound()].
public Integer getStatus()
Copyright © 2009-2013. All Rights Reserved.