public class SearchDocumentList extends Object implements Iterable<SearchDocument>, Externalizable
The size of the list will be less than or equal to the number of rows requested via QueryRequest.setRows(long)
.
Constructor and Description |
---|
SearchDocumentList()
The default constructor
|
SearchDocumentList(int initialSize)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(SearchDocument value) |
void |
clear() |
boolean |
containsDocument(String docID)
Tells whether this document list contains a given document based on document ID.
|
boolean |
equals(Object other) |
SearchDocument |
get(int index) |
SearchDocument |
getDocument(String id)
Gets a document from this list by ID.
|
float |
getMaxScore()
Get the maximum score across all matching documents.
|
long |
getNumberFound() |
long |
getOffset()
Get the offset that into the overall result set for the first document in this SearchDocumentList.
|
int |
hashCode() |
Iterator<SearchDocument> |
iterator() |
void |
readExternal(ObjectInput in) |
void |
setMaxScore(float value) |
void |
setNumberFound(long nf) |
void |
setOffset(long value)
Set the offset that into the overall result set for the first document in this SearchDocumentList.
|
int |
size() |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public SearchDocumentList()
public SearchDocumentList(int initialSize)
initialSize
- the initial sizepublic long getOffset()
public void setOffset(long value)
public long getNumberFound()
public void setNumberFound(long nf)
public void setMaxScore(float value)
public int size()
public SearchDocument get(int index)
public Iterator<SearchDocument> iterator()
iterator
in interface Iterable<SearchDocument>
public void add(SearchDocument value)
public void clear()
public float getMaxScore()
NOTE: this will be 0.0 if the result is not orderd by score and document scores are not requested.
Adding FieldNames.SCORE
field to QueryRequest
will
force computation of max score.
public boolean containsDocument(String docID)
docID
- the document IDpublic SearchDocument getDocument(String id)
id
- the ID to look forpublic void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
IOException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.