Documentation ¶
Index ¶
- Constants
- Variables
- func AddFuzzy(q *query.Query)
- func AnalyzerConstructor(config map[string]interface{}, cache *registry.Cache) (analysis.Analyzer, error)
- func AsIntOrDefault(s string, def int) int
- func ChangeLoneWildcardIntoMatchAll(q *query.Query)
- func CutoffAtRune(s string) string
- func DebugFilter(prefix string) analysis.TokenFilter
- func DeleteHandler(idx *indexWrap) http.HandlerFunc
- func Execute(ctx context.Context, cfg config.Config) error
- func ExtendedSearchHandler(idx *indexWrap) http.HandlerFunc
- func IndexStatsHandler(idx *indexWrap) http.HandlerFunc
- func IsASCII(input []byte) bool
- func NewIndex(indexPath string) (*indexWrap, error)
- func NewMultiAnalyzer(pre PrefilterFn, a ...analysis.Analyzer) analysis.Analyzer
- func NewServer(ctx context.Context, idx *indexWrap) (*http.Server, error)
- func NgramFilter(min, max int) analysis.TokenFilter
- func Open(ctx context.Context, cfg config.Config) (radio.SearchService, error)
- func RemoveRegexQuery(q *query.Query)
- func RomajiFilter(input analysis.TokenStream) analysis.TokenStream
- func SearchHandler(idx *indexWrap) http.HandlerFunc
- func SearchJSONHandler(idx *indexWrap) http.HandlerFunc
- func UpdateHandler(idx *indexWrap) http.HandlerFunc
- type Client
- type FilterFn
- type KagomeTokenizer
- type PrefilterFn
- type RadioQuery
- type SearchError
Constants ¶
View Source
const MaxQuerySize = 512
View Source
const NgramFilterMax = 3
View Source
const NgramFilterMin = 2
Variables ¶
View Source
var ( DefaultLimit = 20 DefaultOffset = 0 DefaultSort = []string{"-priority", "-_score"} )
Functions ¶
func AnalyzerConstructor ¶
func AsIntOrDefault ¶
func CutoffAtRune ¶
func DebugFilter ¶
func DebugFilter(prefix string) analysis.TokenFilter
func DeleteHandler ¶
func DeleteHandler(idx *indexWrap) http.HandlerFunc
func ExtendedSearchHandler ¶
func ExtendedSearchHandler(idx *indexWrap) http.HandlerFunc
func IndexStatsHandler ¶
func IndexStatsHandler(idx *indexWrap) http.HandlerFunc
func NewMultiAnalyzer ¶
func NewMultiAnalyzer(pre PrefilterFn, a ...analysis.Analyzer) analysis.Analyzer
func NgramFilter ¶
func NgramFilter(min, max int) analysis.TokenFilter
func RemoveRegexQuery ¶
func RomajiFilter ¶
func RomajiFilter(input analysis.TokenStream) analysis.TokenStream
func SearchHandler ¶
func SearchHandler(idx *indexWrap) http.HandlerFunc
func SearchJSONHandler ¶
func SearchJSONHandler(idx *indexWrap) http.HandlerFunc
func UpdateHandler ¶
func UpdateHandler(idx *indexWrap) http.HandlerFunc
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type FilterFn ¶
type FilterFn func(input analysis.TokenStream) analysis.TokenStream
func (FilterFn) Filter ¶
func (fn FilterFn) Filter(input analysis.TokenStream) analysis.TokenStream
type KagomeTokenizer ¶
type KagomeTokenizer struct {
// contains filtered or unexported fields
}
func NewKagomeTokenizer ¶
func NewKagomeTokenizer() *KagomeTokenizer
func (*KagomeTokenizer) Tokenize ¶
func (t *KagomeTokenizer) Tokenize(input []byte) analysis.TokenStream
type PrefilterFn ¶
type RadioQuery ¶
type RadioQuery struct {
Query string `json:"query"`
}
func (*RadioQuery) Searcher ¶
func (rq *RadioQuery) Searcher(ctx context.Context, i index.IndexReader, m mapping.IndexMapping, options search.SearcherOptions) (search.Searcher, error)
type SearchError ¶
type SearchError struct {
Err string
}
func (*SearchError) Error ¶
func (se *SearchError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.