A single matching document returned by a vector search, with its relevance score and highlighted paragraphs. Instances are built by the vector search service from the underlying index hits and collected into a VectorSearchResult. A document may carry a list of type tags used to filter which results a caller is allowed to see, and a set of ParagraphItem highlights showing the matching passages within its content.

Implements: Serializable


Properties

PropertyReturnsDescription
contentStringFull text content of the matching document, as it was originally indexed.
idStringUnique identifier of the underlying document, as assigned by the index.
paragraphsList<ParagraphItem>Highlighted content fragments showing where the search terms matched within this document. Empty until paragraphs are added by the search service.
pathStringPath of the document within the website, used to link back to the original item.
scoreDoubleRelevance score assigned to this document by the search engine, higher meaning a closer match. May be null if the underlying search does not report a score.
titleStringTitle of the matching document, as it was originally indexed.
typeStringType name of the document, identifying which kind of content this item represents.
typesList<String>Asset type tags recorded against the document, used to restrict which users can see it in results. May be null or empty if the document is not restricted.

Methods

getId()

Returns: String

Unique identifier of the underlying document, as assigned by the index.

getTitle()

Returns: String

Title of the matching document, as it was originally indexed.

getContent()

Returns: String

Full text content of the matching document, as it was originally indexed.

getPath()

Returns: String

Path of the document within the website, used to link back to the original item.

getType()

Returns: String

Type name of the document, identifying which kind of content this item represents.

getTypes()

Returns: List<String>

Asset type tags recorded against the document, used to restrict which users can see it in results. May be null or empty if the document is not restricted.

getScore()

Returns: Double

Relevance score assigned to this document by the search engine, higher meaning a closer match. May be null if the underlying search does not report a score.

getParagraphs()

Returns: List<ParagraphItem>

Highlighted content fragments showing where the search terms matched within this document. Empty until paragraphs are added by the search service.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.