public interface MatchDocumentSummary
A MatchDocumentSummary is the information returned for each document found by a search.
| Modifier and Type | Method and Description |
|---|---|
double |
getConfidence()
Returns the confidence messsure associated with the document.
|
ExtractedResult |
getExtracted() |
<T extends XMLReadHandle> |
getFirstSnippet(T handle)
Returns the content of the first snippet for the matched result document as a convenience, especially for a raw snippet that contains the entire result document.
|
<T> T |
getFirstSnippetAs(Class<T> as)
Reads the content of the first snippet for the matched result document in the representation specified by the IO class.
|
String |
getFirstSnippetText()
Returns the text of the first snippet as a convenience, especially for a raw snippet that contains an entire document in JSON or text format.
|
double |
getFitness()
Returns the fitness of the document.
|
Format |
getFormat()
Returns the format associated with this document
|
MatchLocation[] |
getMatchLocations()
Returns an array of match locations.
|
Document |
getMetadata()
Returns the metadata associated with this document.
|
<T extends XMLReadHandle> |
getMetadata(T handle)
Returns the metadata extracted from the result document.
|
<T> T |
getMetadataAs(Class<T> as)
Reads the metadata extracted from the matched result document in the representation specified by the IO class.
|
String |
getMimeType()
Returns the mime type associated with this document.
|
String |
getPath()
Returns the path of the match.
|
Document |
getRelevanceInfo()
Get relevance info for a particular result.
|
<T extends XMLReadHandle> |
getRelevanceInfo(T handle)
Returns the relevance information for the result.
|
int |
getScore()
Returns the score associated with the document.
|
String[] |
getSimilarDocumentUris()
Returns the uris for documents similar to the result (if requested).
|
<T extends XMLReadHandle> |
getSnippetIterator(T handle)
Returns an iterator over the snippets matched for the result.
|
Document[] |
getSnippets()
Returns an array of snippets.
|
String |
getUri()
Returns the URI of the document.
|
String getUri()
Returns the URI of the document.
int getScore()
Returns the score associated with the document.
double getConfidence()
Returns the confidence messsure associated with the document.
ExtractedResult getExtracted()
double getFitness()
Returns the fitness of the document.
String getPath()
Returns the path of the match.
MatchLocation[] getMatchLocations()
Returns an array of match locations.
Match locations (and snippets) can be represented as Java objects or DOM Documents, depending on the nature of the snippet and the configuration of the SearchHandle. If they are DOM documents, getMatchLocations() will return null and getSnippets() will return the documents.
Document[] getSnippets()
Returns an array of snippets.
Match locations (and snippets) can be represented as Java objects or DOM Documents, depending on the nature of the snippet and the configuration of the SearchHandle. If they are DOM documents, getMatchLocations() will return null and getSnippets() will return the documents.
<T extends XMLReadHandle> Iterator<T> getSnippetIterator(T handle)
Returns an iterator over the snippets matched for the result.
T - the type of XMLReadHandle to iterate overhandle - An XML handle for reading the snippets.<T> T getFirstSnippetAs(Class<T> as)
Reads the content of the first snippet for the matched result document in the representation specified by the IO class. This method provides particular convenience for a raw snippet that contains the entire result document.
The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered.
T - the type of object that will be returned by the handle registered for itas - the IO class for reading the first snippet for the result<T extends XMLReadHandle> T getFirstSnippet(T handle)
Returns the content of the first snippet for the matched result document as a convenience, especially for a raw snippet that contains the entire result document.
T - the type of XMLReadHandle to returnhandle - An XML handle for reading the first snippet.String getFirstSnippetText()
Returns the text of the first snippet as a convenience, especially for a raw snippet that contains an entire document in JSON or text format.
Document getMetadata()
Returns the metadata associated with this document.
<T> T getMetadataAs(Class<T> as)
Reads the metadata extracted from the matched result document in the representation specified by the IO class.
The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered.
T - the type of object that will be returned by the handle registered for itas - the IO class for reading the metadata for the result<T extends XMLReadHandle> T getMetadata(T handle)
Returns the metadata extracted from the result document.
T - the type of XMLReadHandle to returnhandle - An XML handle for reading the metadata.String getMimeType()
Returns the mime type associated with this document.
Format getFormat()
Returns the format associated with this document
Document getRelevanceInfo()
Get relevance info for a particular result. Includes data only if a query was sent with the ‘relevance-trace’ search option.
<T extends XMLReadHandle> T getRelevanceInfo(T handle)
Returns the relevance information for the result.
T - the type of XMLReadHandle to returnhandle - An XML handle for reading the relevance information.String[] getSimilarDocumentUris()
Returns the uris for documents similar to the result (if requested).
Copyright © 2013-2017 MarkLogic Corporation.