Class SolrJSONResultSet
- java.lang.Object
-
- org.alfresco.repo.search.impl.solr.SolrJSONResultSet
-
- All Implemented Interfaces:
Iterable<ResultSetRow>,SearchEngineResultMetadata,SearchEngineResultSet,ResultSet,ResultSetSPI<ResultSetRow,ResultSetMetaData>
public class SolrJSONResultSet extends Object implements SearchEngineResultSet
Apache SolrSearchEngineResultSetimplementation.
-
-
Constructor Summary
Constructors Constructor Description SolrJSONResultSet(org.json.JSONObject json, SearchParameters searchParameters, NodeService nodeService, NodeDAO nodeDao, LimitBy limitBy, int maxResults)Detached result set based on that provided
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
SolrJSONResultSet
public SolrJSONResultSet(org.json.JSONObject json, SearchParameters searchParameters, NodeService nodeService, NodeDAO nodeDao, LimitBy limitBy, int maxResults)Detached result set based on that provided- Parameters:
json- JSONObjectsearchParameters- SearchParametersnodeService- NodeServicenodeDao- NodeDAOlimitBy- LimitBymaxResults- int
-
-
Method Detail
-
buildRanges
protected Map<String,List<Map<String,String>>> buildRanges(org.json.JSONObject facet_ranges) throws org.json.JSONException
- Throws:
org.json.JSONException
-
buildStats
protected Map<String,Map<String,Object>> buildStats(org.json.JSONObject statsObj) throws org.json.JSONException
- Throws:
org.json.JSONException
-
buildPivot
protected List<GenericFacetResponse> buildPivot(org.json.JSONObject facet_pivot, String pivotName, List<RangeParameters> rangeParameters) throws org.json.JSONException
- Throws:
org.json.JSONException
-
getNodeService
public NodeService getNodeService()
-
close
public void close()
- Specified by:
closein interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getBulkFetch
public boolean getBulkFetch()
- Specified by:
getBulkFetchin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getBulkFetchSize
public int getBulkFetchSize()
- Specified by:
getBulkFetchSizein interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getChildAssocRef
public ChildAssociationRef getChildAssocRef(int n)
- Specified by:
getChildAssocRefin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getChildAssocRefs
public List<ChildAssociationRef> getChildAssocRefs()
- Specified by:
getChildAssocRefsin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getNodeRef
public NodeRef getNodeRef(int n)
- Specified by:
getNodeRefin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getNodeRefs
public List<NodeRef> getNodeRefs()
- Specified by:
getNodeRefsin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getResultSetMetaData
public ResultSetMetaData getResultSetMetaData()
- Specified by:
getResultSetMetaDatain interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getRow
public ResultSetRow getRow(int i)
- Specified by:
getRowin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getScore
public float getScore(int n)
- Specified by:
getScorein interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getStart
public int getStart()
- Specified by:
getStartin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
hasMore
public boolean hasMore()
- Specified by:
hasMorein interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
length
public int length()
- Specified by:
lengthin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
setBulkFetch
public boolean setBulkFetch(boolean bulkFetch)
- Specified by:
setBulkFetchin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
setBulkFetchSize
public int setBulkFetchSize(int bulkFetchSize)
- Specified by:
setBulkFetchSizein interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
iterator
public Iterator<ResultSetRow> iterator()
- Specified by:
iteratorin interfaceIterable<ResultSetRow>
-
getQueryTime
public Long getQueryTime()
Description copied from interface:SearchEngineResultMetadataReturns the query execution time, or put in other words, the amount of time the search engine spent for processing the request.- Specified by:
getQueryTimein interfaceSearchEngineResultMetadata- Returns:
- the queryTime
-
getNumberFound
public long getNumberFound()
Description copied from interface:SearchEngineResultMetadataTotal number of items matching a the current query execution.- Specified by:
getNumberFoundin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>- Specified by:
getNumberFoundin interfaceSearchEngineResultMetadata- Returns:
- the numberFound
-
getFieldFacet
public List<Pair<String,Integer>> getFieldFacet(String field)
- Specified by:
getFieldFacetin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getFieldFacets
public Map<String,List<Pair<String,Integer>>> getFieldFacets()
- Specified by:
getFieldFacetsin interfaceSearchEngineResultSet
-
getFacetIntervals
public Map<String,List<Pair<String,Integer>>> getFacetIntervals()
- Specified by:
getFacetIntervalsin interfaceSearchEngineResultSet
-
getPivotFacets
public List<GenericFacetResponse> getPivotFacets()
- Specified by:
getPivotFacetsin interfaceSearchEngineResultSet
-
getStats
public Map<String,Set<Metric>> getStats()
- Specified by:
getStatsin interfaceSearchEngineResultSet
-
getLastIndexedTxId
public long getLastIndexedTxId()
- Specified by:
getLastIndexedTxIdin interfaceSearchEngineResultSet
-
getFacetQueries
public Map<String,Integer> getFacetQueries()
- Specified by:
getFacetQueriesin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getHighlighting
public Map<NodeRef,List<Pair<String,List<String>>>> getHighlighting()
- Specified by:
getHighlightingin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getSpellCheckResult
public SpellCheckResult getSpellCheckResult()
- Specified by:
getSpellCheckResultin interfaceResultSetSPI<ResultSetRow,ResultSetMetaData>
-
getProcessedDenies
public boolean getProcessedDenies()
- Specified by:
getProcessedDeniesin interfaceSearchEngineResultSet
-
getFacetRanges
public Map<String,List<Map<String,String>>> getFacetRanges()
- Specified by:
getFacetRangesin interfaceSearchEngineResultSet
-
-