InferSimilarityMetric
Specifies the similarity degree where different schemas will be considered to be the same flavor. Applies to Automatic Schema Discovery when TypeDetectionScheme is set to INFER.
Data Type
string
Default Value
"0.7"
Remarks
This property specifies how similar two schemas must be to be considered to be the same flavor. As an example, consider the following rows:
Row 1: ColA, ColB, ColC, ColD
Row 2: ColA, ColB, ColE, ColF
Row 3: ColB, ColF, ColX, ColY
You can configure the columns returned for each flavor with different InferSimilarityMetric values, as in the following examples:
- If you set InferSimilarityMetric to 1, the component will return no flavors.
- If you set InferSimilarityMetric to 0.5, the component will return 2 flavors, Row1 and Row2 making up one, and Row3 making up another.
- If you set InferSimilarityMetric to 0.25, the component will return a single flavor containing all rows.
You can then query document flavors using dot notation, as in the following statement:
SELECT * FROM [Items.Technology]
This property enables additional configuration of Automatic Schema Discovery when you are using the Couchbase Infer command -- TypeDetectionScheme must also be set to Infer to use this propery.