Owns vector search indexing and querying for websites, delegating the actual work to a VectorSearchService. Registered as the vectorSearchManager service, reachable from JS. Use indexItemBuilder and searchParametersBuilder to construct the inputs for indexing and searching, then call the corresponding methods on this manager.

Group: Managers


Methods

indexItemBuilder() · searchParametersBuilder() · search(Website website, SearchParameters parameters) · deleteIndex(Website website) · deleteIndex(String indexName, Website website) · indexItems(List<IndexItem> items, Website website, String indexName) · deleteItems(List<String> ids, Website website) · deleteItem(String id, Website website) · setWebsiteIndex(String indexName, Website website) · createIndex(Website website)

indexItemBuilder()

Returns: IndexItemBuilder

Creates a new, empty builder for assembling an IndexItem to add to a website's search index.

searchParametersBuilder()

Returns: SearchParametersBuilder

Creates a new, empty builder for assembling the parameters of a vector search.

Returns: VectorSearchResult

Runs a vector search against the given website's index, matching and ranking documents against the supplied search terms and returning the highlighted results. Expensive - it embeds the query and calls out to the search engine.

ParameterDescription
websitethe website whose index is searched
parametersthe search terms, paging and highlighting options

deleteIndex(Website website)

Returns: boolean

Deletes the given website's current search index, if it exists.

ParameterDescription
websitethe website whose index is deleted

deleteIndex(String indexName, Website website)

Returns: boolean

Deletes the named search index belonging to the given website, if it exists.

ParameterDescription
indexNamethe name of the index to delete
websitethe website that owns the index

indexItems(List<IndexItem> items, Website website, String indexName)

Returns: boolean

Adds or replaces a batch of documents in the named search index for the given website. Expensive - it embeds each item's title and content and sends the batch to the search engine.

ParameterDescription
itemsthe documents to index
websitethe website that owns the index
indexNamethe name of the index to write to

deleteItems(List<String> ids, Website website)

Returns: void

Removes the documents with the given ids from the given website's search index.

ParameterDescription
idsthe ids of the documents to remove
websitethe website that owns the index

deleteItem(String id, Website website)

Returns: boolean

Removes a single document with the given id from the given website's search index.

ParameterDescription
idthe id of the document to remove
websitethe website that owns the index

setWebsiteIndex(String indexName, Website website)

Returns: void

Records the named index as the search index the given website should use for subsequent searches and indexing calls.

ParameterDescription
indexNamethe name of the index to use
websitethe website to set the index for

createIndex(Website website)

Returns: String

Creates a new, empty search index schema for the given website, ready to have documents added. Does not make the new index the website's active index - call setWebsiteIndex with the returned name to do that.

ParameterDescription
websitethe website to create an index for
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.