fix: Slim stop-word list, related #8395

This commit is contained in:
Tom Moor
2025-02-23 17:26:57 -05:00
parent 0d6026c21f
commit 50f9f414bf
+2 -19
View File
@@ -601,6 +601,8 @@ export default class SearchHelper {
}
private static removeStopWords(query: string): string {
// Based on:
// https://github.com/postgres/postgres/blob/fc0d0ce978752493868496be6558fa17b7c4c3cf/src/backend/snowball/stopwords/english.stop
const stopwords = [
"i",
"me",
@@ -665,7 +667,6 @@ export default class SearchHelper {
"because",
"as",
"until",
"while",
"of",
"at",
"by",
@@ -673,7 +674,6 @@ export default class SearchHelper {
"with",
"about",
"against",
"between",
"into",
"through",
"during",
@@ -681,18 +681,12 @@ export default class SearchHelper {
"after",
"above",
"below",
"to",
"from",
"up",
"down",
"in",
"out",
"on",
"off",
"over",
"under",
"again",
"further",
"then",
"once",
"here",
@@ -700,22 +694,15 @@ export default class SearchHelper {
"when",
"where",
"why",
"how",
"all",
"any",
"both",
"each",
"few",
"more",
"most",
"other",
"some",
"such",
"no",
"nor",
"not",
"only",
"own",
"same",
"so",
"than",
@@ -723,12 +710,8 @@ export default class SearchHelper {
"very",
"s",
"t",
"can",
"will",
"just",
"don",
"should",
"now",
];
return query
.split(" ")