org.alfresco.repo.search.impl.lucene
Class LuceneResultSet

java.lang.Object
  extended by org.alfresco.repo.search.AbstractResultSet
      extended by org.alfresco.repo.search.impl.lucene.LuceneResultSet
All Implemented Interfaces:
java.lang.Iterable, ResultSet

public class LuceneResultSet
extends AbstractResultSet

Implementation of a ResultSet on top of Lucene Hits class.


Constructor Summary
LuceneResultSet(org.apache.lucene.search.Hits hits, org.apache.lucene.search.Searcher searcher, NodeService nodeService, TenantService tenantService, Path[] propertyPaths, SearchParameters searchParameters, LuceneConfig config)
          Wrap a lucene seach result with node support
 
Method Summary
 void close()
          Close the result set.
 ChildAssociationRef getChildAssocRef(int n)
          Get the child assoc ref for a particular row.
 org.apache.lucene.document.Document getDocument(int n)
           
 NodeRef getNodeRef(int n)
          Get the id of the node at the given index
 NodeService getNodeService()
           
 ResultSetMetaData getResultSetMetaData()
          Get the meta data for the results set.
 ResultSetRow getRow(int i)
          Get a row from the result set by row index, starting at 0.
 float getScore(int n)
          Get the score for the node at the given position
 ResultSetRowIterator iterator()
           
 int length()
          Get the size of the result set
 
Methods inherited from class org.alfresco.repo.search.AbstractResultSet
getChildAssocRefs, getNodeRefs, getPropertyPaths
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneResultSet

public LuceneResultSet(org.apache.lucene.search.Hits hits,
                       org.apache.lucene.search.Searcher searcher,
                       NodeService nodeService,
                       TenantService tenantService,
                       Path[] propertyPaths,
                       SearchParameters searchParameters,
                       LuceneConfig config)
Wrap a lucene seach result with node support

Parameters:
storeRef -
hits -
Method Detail

iterator

public ResultSetRowIterator iterator()

length

public int length()
Description copied from interface: ResultSet
Get the size of the result set


getNodeRef

public NodeRef getNodeRef(int n)
Description copied from interface: ResultSet
Get the id of the node at the given index

Parameters:
n - zero-based index

getScore

public float getScore(int n)
               throws SearcherException
Description copied from interface: ResultSet
Get the score for the node at the given position

Specified by:
getScore in interface ResultSet
Overrides:
getScore in class AbstractResultSet
Parameters:
n - zero-based index
Throws:
SearcherException

getDocument

public org.apache.lucene.document.Document getDocument(int n)

close

public void close()
Description copied from interface: ResultSet
Close the result set. This must be called to allow the release of underlying resources.

Specified by:
close in interface ResultSet
Overrides:
close in class AbstractResultSet

getNodeService

public NodeService getNodeService()

getRow

public ResultSetRow getRow(int i)
Description copied from interface: ResultSet
Get a row from the result set by row index, starting at 0.

Parameters:
i - zero-based index

getChildAssocRef

public ChildAssociationRef getChildAssocRef(int n)
Description copied from interface: ResultSet
Get the child assoc ref for a particular row.

Parameters:
n - zero-based index

getResultSetMetaData

public ResultSetMetaData getResultSetMetaData()
Description copied from interface: ResultSet
Get the meta data for the results set.



Copyright © 2005 - 2008 Alfresco Software, Inc. All Rights Reserved.