Improve issue search (#2387)
* Improve issue indexer * Fix new issue sqlite bug * Different test indexer paths for each db * Add integration indexer paths to make clean
This commit is contained in:
parent
52e11b24bf
commit
b0f7457d9e
122 changed files with 15280 additions and 1458 deletions
13
vendor/github.com/blevesearch/bleve/search/query/bool_field.go
generated
vendored
13
vendor/github.com/blevesearch/bleve/search/query/bool_field.go
generated
vendored
|
@ -22,7 +22,7 @@ import (
|
|||
)
|
||||
|
||||
type BoolFieldQuery struct {
|
||||
Bool bool `json:"bool"`
|
||||
Bool bool `json:"bool"`
|
||||
FieldVal string `json:"field,omitempty"`
|
||||
BoostVal *Boost `json:"boost,omitempty"`
|
||||
}
|
||||
|
@ -39,20 +39,19 @@ func (q *BoolFieldQuery) SetBoost(b float64) {
|
|||
q.BoostVal = &boost
|
||||
}
|
||||
|
||||
func (q *BoolFieldQuery) Boost() float64{
|
||||
return q.BoostVal.Value()
|
||||
func (q *BoolFieldQuery) Boost() float64 {
|
||||
return q.BoostVal.Value()
|
||||
}
|
||||
|
||||
func (q *BoolFieldQuery) SetField(f string) {
|
||||
q.FieldVal = f
|
||||
}
|
||||
|
||||
func (q *BoolFieldQuery) Field() string{
|
||||
func (q *BoolFieldQuery) Field() string {
|
||||
return q.FieldVal
|
||||
}
|
||||
|
||||
|
||||
func (q *BoolFieldQuery) Searcher(i index.IndexReader, m mapping.IndexMapping, explain bool) (search.Searcher, error) {
|
||||
func (q *BoolFieldQuery) Searcher(i index.IndexReader, m mapping.IndexMapping, options search.SearcherOptions) (search.Searcher, error) {
|
||||
field := q.FieldVal
|
||||
if q.FieldVal == "" {
|
||||
field = m.DefaultSearchField()
|
||||
|
@ -61,5 +60,5 @@ func (q *BoolFieldQuery) Searcher(i index.IndexReader, m mapping.IndexMapping, e
|
|||
if q.Bool {
|
||||
term = "T"
|
||||
}
|
||||
return searcher.NewTermSearcher(i, term, field, q.BoostVal.Value(), explain)
|
||||
return searcher.NewTermSearcher(i, term, field, q.BoostVal.Value(), options)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue