SearchIndex.setSimilarity(SimilarityAlgorithm similarity) Method

Definition

Set the similarity property: The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used.

public SearchIndex setSimilarity(SimilarityAlgorithm similarity)

Parameters

similarity
SimilarityAlgorithm

the similarity value to set.

Returns

the SearchIndex object itself.

Applies to