Some checks failed
Coverage / coverage (push) Failing after 6s
Tests / test (1.24.x, ubuntu-latest) (push) Failing after 42s
Tests / test (1.26.x, ubuntu-latest) (push) Failing after 38s
Tests / test (1.25.x, ubuntu-latest) (push) Failing after 35s
Tests / test (1.25.x, windows-latest) (push) Has been cancelled
Tests / test (1.26.x, macos-latest) (push) Has been cancelled
Tests / test (1.26.x, windows-latest) (push) Has been cancelled
Tests / test (1.24.x, macos-latest) (push) Has been cancelled
Tests / test (1.24.x, windows-latest) (push) Has been cancelled
Tests / test (1.25.x, macos-latest) (push) Has been cancelled
34 lines
633 B
Go
34 lines
633 B
Go
package ca
|
|
|
|
import (
|
|
"github.com/blevesearch/bleve/v2/analysis"
|
|
"github.com/blevesearch/bleve/v2/registry"
|
|
)
|
|
|
|
const ArticlesName = "articles_ca"
|
|
|
|
// this content was obtained from:
|
|
// lucene-4.7.2/analysis/common/src/resources/org/apache/lucene/analysis
|
|
|
|
var CatalanArticles = []byte(`
|
|
d
|
|
l
|
|
m
|
|
n
|
|
s
|
|
t
|
|
`)
|
|
|
|
func ArticlesTokenMapConstructor(config map[string]interface{}, cache *registry.Cache) (analysis.TokenMap, error) {
|
|
rv := analysis.NewTokenMap()
|
|
err := rv.LoadBytes(CatalanArticles)
|
|
return rv, err
|
|
}
|
|
|
|
func init() {
|
|
err := registry.RegisterTokenMap(ArticlesName, ArticlesTokenMapConstructor)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|