Skip to content

Commit

Permalink
Add doc link to warning when there are fieldset inconstencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hmusum committed Dec 16, 2024
1 parent 2cce992 commit d87c369
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// (this requires adding normalizing and stemming settings to FieldSet).
public class FieldSetSettings extends Processor {

private static String fieldSetDocUrl = "https://docs.vespa.ai/en/reference/schema-reference.html#fieldset";
private static final String fieldSetDocUrl = "https://docs.vespa.ai/en/reference/schema-reference.html#fieldset";

public FieldSetSettings(Schema schema,
DeployLogger deployLogger,
Expand Down Expand Up @@ -66,7 +66,8 @@ private void checkMatching(Schema schema, FieldSet fieldSet) {
if ( ! matching.equals(fieldMatching)) {
warn(schema, field.asField(),
"The matching settings for the fields in " + fieldSet + " are inconsistent " +
"(explicitly or because of field type). This may lead to recall and ranking issues.");
"(explicitly or because of field type). This may lead to recall and ranking issues. " +
"See " + fieldSetDocUrl);
return;
}
}
Expand All @@ -85,7 +86,8 @@ private void checkNormalization(Schema schema, FieldSet fieldSet) {
if ( ! normalizing.equals(fieldNorm)) {
warn(schema, field.asField(),
"The normalization settings for the fields in " + fieldSet + " are inconsistent " +
"(explicitly or because of field type). This may lead to recall and ranking issues.");
"(explicitly or because of field type). This may lead to recall and ranking issues. " +
"See " + fieldSetDocUrl);
return;
}
}
Expand All @@ -104,7 +106,8 @@ private void checkStemming(Schema schema, FieldSet fieldSet) {
warn(schema, field.asField(),
"The stemming settings for the fields in the fieldset '"+fieldSet.getName()+
"' are inconsistent (explicitly or because of field type). " +
"This may lead to recall and ranking issues.");
"This may lead to recall and ranking issues. " +
"See " + fieldSetDocUrl);
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ public void warnableFieldTypeMix() {
assertArrayEquals(new String[]{
"For schema 'child', field 'ps': " +
"The matching settings for the fields in fieldset 'default' are inconsistent (explicitly or because of field type). " +
"This may lead to recall and ranking issues.",
"This may lead to recall and ranking issues. See https://docs.vespa.ai/en/reference/schema-reference.html#fieldset",
"For schema 'child', field 'ps': " +
"The normalization settings for the fields in fieldset 'default' are inconsistent (explicitly or because of field type). " +
"This may lead to recall and ranking issues."}, logger.warnings.toArray());
"This may lead to recall and ranking issues. See https://docs.vespa.ai/en/reference/schema-reference.html#fieldset"},
logger.warnings.toArray());
}

@Test
Expand Down

0 comments on commit d87c369

Please sign in to comment.