-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improved search for documents with metadata in english, spanish, french, italian, german and portuguese, including genre and singular/plural forms of words in the results among others. NOTE: a reindex is required, will be done automatically when launching Coreander. * Show message in home page when user does not have highlights.
- Loading branch information
Showing
16 changed files
with
292 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package index | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/blevesearch/bleve/v2/analysis/analyzer/custom" | ||
"github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode" | ||
"github.com/blevesearch/bleve/v2/mapping" | ||
) | ||
|
||
func addNoStopWordsAnalyzer(lang string, indexMapping *mapping.IndexMappingImpl) error { | ||
if _, ok := noStopWordsFilters[lang]; !ok { | ||
return fmt.Errorf("no stemmer defined for %s", lang) | ||
} | ||
|
||
return indexMapping.AddCustomAnalyzer(lang+"_no_stop_words", | ||
map[string]interface{}{ | ||
"type": custom.Name, | ||
"tokenizer": unicode.Name, | ||
"token_filters": noStopWordsFilters[lang], | ||
}) | ||
} |
Oops, something went wrong.