mirror of
https://github.com/outline/outline.git
synced 2026-05-01 06:59:55 -05:00
fix: Slim stop-word list, related #8395
This commit is contained in:
@@ -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(" ")
|
||||
|
||||
Reference in New Issue
Block a user