Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc link to warning when there are fieldset inconsistencies #33041

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading