33[ Tokenization] ( #tokenization ) |
44[ Stemming] ( #stemming ) |
55[ Stop Words] ( #stop-words ) |
6- [ TF-IDF ranking] ( #tf-idf-ranking )
6+ [ Search Index] ( #configuring-the-search-index ) |
7+ [ Index Stragegy] ( #configuring-the-index-strategy )
78
89# Js Search: client-side search library
910
@@ -144,7 +145,7 @@ appears in the document but is offset by the frequency of the word in the corpus
144145some words (e.g. and, or, the) appear more frequently than others.
145146
146147By default Js Search supports TF-IDF ranking but this can be disabled for performance reasons if it is not required. You
147- can specify an alternate [ ` ISearchIndex ` ] ( https://github.com/wuweiweiwu /js-search/blob/master/source/SearchIndex/SearchIndex.js )
148+ can specify an alternate [ ` ISearchIndex ` ] ( https://github.com/bvaughn /js-search/blob/master/source/SearchIndex/SearchIndex.js )
148149implementation in order to disable TF-IDF, like so:
149150
150151``` javascript
@@ -160,13 +161,17 @@ search.searchIndex = new JsSearch.UnorderedSearchIndex();
160161
161162There are three index strategies packaged with ` js-search ` .
162163
163- ` PrefixIndexStrategy ` indexes for prefix searches
164+ ` PrefixIndexStrategy ` indexes for prefix searches.
164165(e.g. the term "cat" is indexed as "c", "ca", and "cat" allowing prefix search lookups).
165166
166167` AllSubstringsIndexStrategy ` indexes for all substrings. In other word "c", "ca", "cat", "a", "at", and "t" all match "cat".
167168
168169` ExactWordIndexStrategy ` indexes for exact word matches. For example "bob" will match "bob jones".
169170
171+ By default Js Search supports prefix indexing but this can be disabled if it is not required. You
172+ can specify an alternate [ ` IIndexStrategy ` ] ( https://github.com/bvaughn/js-search/blob/master/source/IndexStrategy/IndexStrategy.js )
173+ implementation in order to disable prefix indexing, like so:
174+
170175``` javascript
171176// default
172177search .indexStrategy = new JsSearch.PrefixIndexStrategy ();
0 commit comments