Fluent builder for assembling an IndexItem to add to a website's vector search index. Obtained from VectorSearchManager.indexItemBuilder, populated with the fields to index, and finished with build to produce the immutable IndexItem passed to VectorSearchManager.indexItems.

Group: Builders


Methods

id(String id)

Returns: IndexItemBuilder

Sets the document's unique identifier within its index. If left unset, the search service assigns a random id when the item is indexed.

ParameterDescription
idthe document's id

title(String s)

Returns: IndexItemBuilder

Sets the document's title, which is indexed and embedded alongside the content for search matching.

ParameterDescription
sthe document's title

content(String s)

Returns: IndexItemBuilder

Sets the document's full text content, which is indexed and embedded for search matching.

ParameterDescription
sthe document's full text content

type(String s)

Returns: IndexItemBuilder

Sets the type name identifying what kind of content the document represents.

ParameterDescription
sthe document's type name

path(String s)

Returns: IndexItemBuilder

Sets the path of the document within the website, used to link back to the original item from search results.

ParameterDescription
sthe document's path within the website

types(List<String> typestypes)

Returns: IndexItemBuilder

Replaces the document's asset type tags, used to restrict which users can see it in search results.

ParameterDescription
typestypesthe document's asset type tags

addType(String type)

Returns: IndexItemBuilder

Adds a single asset type tag to the document's existing list of types.

ParameterDescription
typethe asset type tag to add

build()

Returns: IndexItem

Builds the immutable IndexItem from the fields set on this builder, ready to be passed to VectorSearchManager.indexItems.

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