Test that long words are omitted from the search index.

Note they do appear in the 'docs' part of searchindex.json (so they will be
visible in search teasers).
This commit is contained in:
Matthew Woodcraft 2022-05-22 13:57:09 +01:00
parent 1f8c090a5f
commit 000a93dc77
3 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,5 @@
Capybara capybara capybara.
Capybara capybara capybara.
Capybara capybara capybara.
ThisLongWordIsIncludedSoWeCanCheckThatSufficientlyLongWordsAreOmittedFromTheSearchIndex.

View File

@ -772,7 +772,7 @@ mod search {
);
assert_eq!(
docs[&no_headers]["body"],
"Capybara capybara capybara. Capybara capybara capybara."
"Capybara capybara capybara. Capybara capybara capybara. ThisLongWordIsIncludedSoWeCanCheckThatSufficientlyLongWordsAreOmittedFromTheSearchIndex."
);
}

View File

@ -229,7 +229,7 @@
"title": "Unicode stress tests"
},
"18": {
"body": "Capybara capybara capybara. Capybara capybara capybara.",
"body": "Capybara capybara capybara. Capybara capybara capybara. ThisLongWordIsIncludedSoWeCanCheckThatSufficientlyLongWordsAreOmittedFromTheSearchIndex.",
"breadcrumbs": "First Chapter » No Headers",
"id": "18",
"title": "First Chapter"