2014-04-25 18:45:23 +02:00
|
|
|
// Copyright (c) 2014 Couchbase, Inc.
|
2016-10-02 16:13:14 +02:00
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
2014-09-02 16:54:50 +02:00
|
|
|
|
2016-10-02 16:29:39 +02:00
|
|
|
package searcher
|
2014-04-25 18:45:23 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"math"
|
|
|
|
|
2014-08-28 21:38:57 +02:00
|
|
|
"github.com/blevesearch/bleve/index"
|
2014-09-01 17:15:38 +02:00
|
|
|
"github.com/blevesearch/bleve/search"
|
2016-10-01 23:20:59 +02:00
|
|
|
"github.com/blevesearch/bleve/search/scorer"
|
2014-04-25 18:45:23 +02:00
|
|
|
)
|
|
|
|
|
2014-08-07 02:03:41 +02:00
|
|
|
type BooleanSearcher struct {
|
2014-09-12 23:21:35 +02:00
|
|
|
indexReader index.IndexReader
|
2014-09-01 17:15:38 +02:00
|
|
|
mustSearcher search.Searcher
|
|
|
|
shouldSearcher search.Searcher
|
|
|
|
mustNotSearcher search.Searcher
|
2014-04-25 18:45:23 +02:00
|
|
|
queryNorm float64
|
2016-08-01 20:58:02 +02:00
|
|
|
currMust *search.DocumentMatch
|
|
|
|
currShould *search.DocumentMatch
|
|
|
|
currMustNot *search.DocumentMatch
|
2016-07-31 19:46:18 +02:00
|
|
|
currentID index.IndexInternalID
|
2014-04-25 18:45:23 +02:00
|
|
|
min uint64
|
2016-10-02 16:29:39 +02:00
|
|
|
scorer *scorer.ConjunctionQueryScorer
|
2016-09-18 19:28:50 +02:00
|
|
|
matches []*search.DocumentMatch
|
|
|
|
initialized bool
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
|
|
|
|
2014-09-12 23:21:35 +02:00
|
|
|
func NewBooleanSearcher(indexReader index.IndexReader, mustSearcher search.Searcher, shouldSearcher search.Searcher, mustNotSearcher search.Searcher, explain bool) (*BooleanSearcher, error) {
|
2014-04-25 18:45:23 +02:00
|
|
|
// build our searcher
|
2014-08-07 02:03:41 +02:00
|
|
|
rv := BooleanSearcher{
|
2014-09-12 23:21:35 +02:00
|
|
|
indexReader: indexReader,
|
2014-04-25 18:45:23 +02:00
|
|
|
mustSearcher: mustSearcher,
|
|
|
|
shouldSearcher: shouldSearcher,
|
|
|
|
mustNotSearcher: mustNotSearcher,
|
2016-10-02 16:29:39 +02:00
|
|
|
scorer: scorer.NewConjunctionQueryScorer(explain),
|
2016-09-18 19:28:50 +02:00
|
|
|
matches: make([]*search.DocumentMatch, 2),
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
|
|
|
rv.computeQueryNorm()
|
|
|
|
return &rv, nil
|
|
|
|
}
|
|
|
|
|
2014-08-07 02:03:41 +02:00
|
|
|
func (s *BooleanSearcher) computeQueryNorm() {
|
2014-04-25 18:45:23 +02:00
|
|
|
// first calculate sum of squared weights
|
|
|
|
sumOfSquaredWeights := 0.0
|
|
|
|
if s.mustSearcher != nil {
|
|
|
|
sumOfSquaredWeights += s.mustSearcher.Weight()
|
|
|
|
}
|
|
|
|
if s.shouldSearcher != nil {
|
|
|
|
sumOfSquaredWeights += s.shouldSearcher.Weight()
|
|
|
|
}
|
|
|
|
|
|
|
|
// now compute query norm from this
|
|
|
|
s.queryNorm = 1.0 / math.Sqrt(sumOfSquaredWeights)
|
2014-12-18 18:43:12 +01:00
|
|
|
// finally tell all the downstream searchers the norm
|
2014-04-25 18:45:23 +02:00
|
|
|
if s.mustSearcher != nil {
|
|
|
|
s.mustSearcher.SetQueryNorm(s.queryNorm)
|
|
|
|
}
|
|
|
|
if s.shouldSearcher != nil {
|
|
|
|
s.shouldSearcher.SetQueryNorm(s.queryNorm)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-09 04:21:47 +02:00
|
|
|
func (s *BooleanSearcher) initSearchers(ctx *search.SearchContext) error {
|
2014-04-25 18:45:23 +02:00
|
|
|
var err error
|
|
|
|
// get all searchers pointing at their first match
|
|
|
|
if s.mustSearcher != nil {
|
2016-08-09 04:21:47 +02:00
|
|
|
if s.currMust != nil {
|
|
|
|
ctx.DocumentMatchPool.Put(s.currMust)
|
|
|
|
}
|
|
|
|
s.currMust, err = s.mustSearcher.Next(ctx)
|
2014-04-25 18:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if s.shouldSearcher != nil {
|
2016-08-09 04:21:47 +02:00
|
|
|
if s.currShould != nil {
|
|
|
|
ctx.DocumentMatchPool.Put(s.currShould)
|
|
|
|
}
|
|
|
|
s.currShould, err = s.shouldSearcher.Next(ctx)
|
2014-04-25 18:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if s.mustNotSearcher != nil {
|
2016-08-09 04:21:47 +02:00
|
|
|
if s.currMustNot != nil {
|
|
|
|
ctx.DocumentMatchPool.Put(s.currMustNot)
|
|
|
|
}
|
|
|
|
s.currMustNot, err = s.mustNotSearcher.Next(ctx)
|
2014-04-25 18:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if s.mustSearcher != nil && s.currMust != nil {
|
2016-08-01 20:58:02 +02:00
|
|
|
s.currentID = s.currMust.IndexInternalID
|
2014-04-25 18:45:23 +02:00
|
|
|
} else if s.mustSearcher == nil && s.currShould != nil {
|
2016-08-01 20:58:02 +02:00
|
|
|
s.currentID = s.currShould.IndexInternalID
|
2014-04-25 18:45:23 +02:00
|
|
|
} else {
|
2016-07-31 19:46:18 +02:00
|
|
|
s.currentID = nil
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
|
|
|
|
2014-08-07 01:36:23 +02:00
|
|
|
s.initialized = true
|
2014-04-25 18:45:23 +02:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2016-08-09 04:21:47 +02:00
|
|
|
func (s *BooleanSearcher) advanceNextMust(ctx *search.SearchContext, skipReturn *search.DocumentMatch) error {
|
2014-04-25 18:45:23 +02:00
|
|
|
var err error
|
|
|
|
|
|
|
|
if s.mustSearcher != nil {
|
2016-08-09 04:21:47 +02:00
|
|
|
if s.currMust != skipReturn {
|
|
|
|
ctx.DocumentMatchPool.Put(s.currMust)
|
|
|
|
}
|
|
|
|
s.currMust, err = s.mustSearcher.Next(ctx)
|
2014-04-25 18:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2016-09-20 21:21:53 +02:00
|
|
|
} else {
|
2016-08-09 04:21:47 +02:00
|
|
|
if s.currShould != skipReturn {
|
|
|
|
ctx.DocumentMatchPool.Put(s.currShould)
|
|
|
|
}
|
|
|
|
s.currShould, err = s.shouldSearcher.Next(ctx)
|
2014-04-25 18:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if s.mustSearcher != nil && s.currMust != nil {
|
2016-08-01 20:58:02 +02:00
|
|
|
s.currentID = s.currMust.IndexInternalID
|
2014-04-25 18:45:23 +02:00
|
|
|
} else if s.mustSearcher == nil && s.currShould != nil {
|
2016-08-01 20:58:02 +02:00
|
|
|
s.currentID = s.currShould.IndexInternalID
|
2014-04-25 18:45:23 +02:00
|
|
|
} else {
|
2016-07-31 19:46:18 +02:00
|
|
|
s.currentID = nil
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2014-08-07 02:03:41 +02:00
|
|
|
func (s *BooleanSearcher) Weight() float64 {
|
2014-04-25 18:45:23 +02:00
|
|
|
var rv float64
|
2014-04-25 20:47:15 +02:00
|
|
|
if s.mustSearcher != nil {
|
|
|
|
rv += s.mustSearcher.Weight()
|
|
|
|
}
|
|
|
|
if s.shouldSearcher != nil {
|
|
|
|
rv += s.shouldSearcher.Weight()
|
|
|
|
}
|
2014-04-25 18:45:23 +02:00
|
|
|
|
|
|
|
return rv
|
|
|
|
}
|
|
|
|
|
2014-08-07 02:03:41 +02:00
|
|
|
func (s *BooleanSearcher) SetQueryNorm(qnorm float64) {
|
2014-04-25 20:47:15 +02:00
|
|
|
if s.mustSearcher != nil {
|
|
|
|
s.mustSearcher.SetQueryNorm(qnorm)
|
|
|
|
}
|
|
|
|
if s.shouldSearcher != nil {
|
|
|
|
s.shouldSearcher.SetQueryNorm(qnorm)
|
|
|
|
}
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
|
|
|
|
2016-08-09 04:21:47 +02:00
|
|
|
func (s *BooleanSearcher) Next(ctx *search.SearchContext) (*search.DocumentMatch, error) {
|
2014-04-25 18:45:23 +02:00
|
|
|
|
2014-08-07 01:36:23 +02:00
|
|
|
if !s.initialized {
|
2016-08-09 04:21:47 +02:00
|
|
|
err := s.initSearchers(ctx)
|
2014-08-07 01:36:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-25 18:45:23 +02:00
|
|
|
var err error
|
2016-08-01 20:58:02 +02:00
|
|
|
var rv *search.DocumentMatch
|
2014-04-25 18:45:23 +02:00
|
|
|
|
2016-07-31 19:46:18 +02:00
|
|
|
for s.currentID != nil {
|
2016-09-20 18:38:55 +02:00
|
|
|
if s.currMustNot != nil {
|
|
|
|
cmp := s.currMustNot.IndexInternalID.Compare(s.currentID)
|
|
|
|
if cmp < 0 {
|
2016-08-09 04:21:47 +02:00
|
|
|
ctx.DocumentMatchPool.Put(s.currMustNot)
|
2016-09-20 18:38:55 +02:00
|
|
|
// advance must not searcher to our candidate entry
|
|
|
|
s.currMustNot, err = s.mustNotSearcher.Advance(ctx, s.currentID)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if s.currMustNot != nil && s.currMustNot.IndexInternalID.Equals(s.currentID) {
|
|
|
|
// the candidate is excluded
|
|
|
|
err = s.advanceNextMust(ctx, nil)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
} else if cmp == 0 {
|
2014-04-25 18:45:23 +02:00
|
|
|
// the candidate is excluded
|
2016-08-09 04:21:47 +02:00
|
|
|
err = s.advanceNextMust(ctx, nil)
|
2015-03-06 20:46:29 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2014-04-25 18:45:23 +02:00
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-20 18:38:55 +02:00
|
|
|
shouldCmpOrNil := 1 // NOTE: shouldCmp will also be 1 when currShould == nil.
|
|
|
|
if s.currShould != nil {
|
|
|
|
shouldCmpOrNil = s.currShould.IndexInternalID.Compare(s.currentID)
|
|
|
|
}
|
|
|
|
|
|
|
|
if shouldCmpOrNil < 0 {
|
|
|
|
ctx.DocumentMatchPool.Put(s.currShould)
|
2014-08-07 01:36:23 +02:00
|
|
|
// advance should searcher to our candidate entry
|
2016-08-09 04:21:47 +02:00
|
|
|
s.currShould, err = s.shouldSearcher.Advance(ctx, s.currentID)
|
2014-04-25 18:45:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2016-08-01 20:58:02 +02:00
|
|
|
if s.currShould != nil && s.currShould.IndexInternalID.Equals(s.currentID) {
|
2014-04-25 18:45:23 +02:00
|
|
|
// score bonus matches should
|
2016-08-01 20:58:02 +02:00
|
|
|
var cons []*search.DocumentMatch
|
2014-04-25 18:45:23 +02:00
|
|
|
if s.currMust != nil {
|
2016-09-18 19:28:50 +02:00
|
|
|
cons = s.matches
|
|
|
|
cons[0] = s.currMust
|
|
|
|
cons[1] = s.currShould
|
2015-04-03 22:50:48 +02:00
|
|
|
} else {
|
2016-09-18 19:28:50 +02:00
|
|
|
cons = s.matches[0:1]
|
|
|
|
cons[0] = s.currShould
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
2016-08-09 04:21:47 +02:00
|
|
|
rv = s.scorer.Score(ctx, cons)
|
|
|
|
err = s.advanceNextMust(ctx, rv)
|
2015-03-06 20:46:29 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2014-04-25 18:45:23 +02:00
|
|
|
break
|
2014-08-30 00:14:12 +02:00
|
|
|
} else if s.shouldSearcher.Min() == 0 {
|
2014-04-25 18:45:23 +02:00
|
|
|
// match is OK anyway
|
2016-09-18 19:28:50 +02:00
|
|
|
cons := s.matches[0:1]
|
|
|
|
cons[0] = s.currMust
|
|
|
|
rv = s.scorer.Score(ctx, cons)
|
2016-08-09 04:21:47 +02:00
|
|
|
err = s.advanceNextMust(ctx, rv)
|
2015-03-06 20:46:29 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2014-04-25 18:45:23 +02:00
|
|
|
break
|
|
|
|
}
|
2016-09-20 18:38:55 +02:00
|
|
|
} else if shouldCmpOrNil == 0 {
|
2014-04-25 18:45:23 +02:00
|
|
|
// score bonus matches should
|
2016-08-01 20:58:02 +02:00
|
|
|
var cons []*search.DocumentMatch
|
2014-04-25 18:45:23 +02:00
|
|
|
if s.currMust != nil {
|
2016-09-18 19:28:50 +02:00
|
|
|
cons = s.matches
|
|
|
|
cons[0] = s.currMust
|
|
|
|
cons[1] = s.currShould
|
2015-04-03 22:50:48 +02:00
|
|
|
} else {
|
2016-09-18 19:28:50 +02:00
|
|
|
cons = s.matches[0:1]
|
|
|
|
cons[0] = s.currShould
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
2016-08-09 04:21:47 +02:00
|
|
|
rv = s.scorer.Score(ctx, cons)
|
|
|
|
err = s.advanceNextMust(ctx, rv)
|
2015-03-06 20:46:29 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2014-04-25 18:45:23 +02:00
|
|
|
break
|
2014-08-30 00:14:12 +02:00
|
|
|
} else if s.shouldSearcher == nil || s.shouldSearcher.Min() == 0 {
|
2014-04-25 18:45:23 +02:00
|
|
|
// match is OK anyway
|
2016-09-18 19:28:50 +02:00
|
|
|
cons := s.matches[0:1]
|
|
|
|
cons[0] = s.currMust
|
|
|
|
rv = s.scorer.Score(ctx, cons)
|
2016-08-09 04:21:47 +02:00
|
|
|
err = s.advanceNextMust(ctx, rv)
|
2015-03-06 20:46:29 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2014-04-25 18:45:23 +02:00
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2016-08-09 04:21:47 +02:00
|
|
|
err = s.advanceNextMust(ctx, nil)
|
2015-03-06 20:46:29 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
|
|
|
return rv, nil
|
|
|
|
}
|
|
|
|
|
2016-08-09 04:21:47 +02:00
|
|
|
func (s *BooleanSearcher) Advance(ctx *search.SearchContext, ID index.IndexInternalID) (*search.DocumentMatch, error) {
|
2014-08-07 01:36:23 +02:00
|
|
|
|
|
|
|
if !s.initialized {
|
2016-08-09 04:21:47 +02:00
|
|
|
err := s.initSearchers(ctx)
|
2014-08-07 01:36:23 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-25 20:47:15 +02:00
|
|
|
var err error
|
|
|
|
if s.mustSearcher != nil {
|
2016-08-09 04:21:47 +02:00
|
|
|
if s.currMust != nil {
|
|
|
|
ctx.DocumentMatchPool.Put(s.currMust)
|
|
|
|
}
|
|
|
|
s.currMust, err = s.mustSearcher.Advance(ctx, ID)
|
2014-04-25 20:47:15 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if s.shouldSearcher != nil {
|
2016-08-09 04:21:47 +02:00
|
|
|
if s.currShould != nil {
|
|
|
|
ctx.DocumentMatchPool.Put(s.currShould)
|
|
|
|
}
|
|
|
|
s.currShould, err = s.shouldSearcher.Advance(ctx, ID)
|
2014-04-25 20:47:15 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if s.mustNotSearcher != nil {
|
2016-08-09 04:21:47 +02:00
|
|
|
if s.currMustNot != nil {
|
|
|
|
ctx.DocumentMatchPool.Put(s.currMustNot)
|
|
|
|
}
|
|
|
|
s.currMustNot, err = s.mustNotSearcher.Advance(ctx, ID)
|
2014-04-25 20:47:15 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-21 22:48:51 +02:00
|
|
|
if s.mustSearcher != nil && s.currMust != nil {
|
2016-08-01 20:58:02 +02:00
|
|
|
s.currentID = s.currMust.IndexInternalID
|
2014-07-21 22:48:51 +02:00
|
|
|
} else if s.mustSearcher == nil && s.currShould != nil {
|
2016-08-01 20:58:02 +02:00
|
|
|
s.currentID = s.currShould.IndexInternalID
|
2014-07-21 22:48:51 +02:00
|
|
|
} else {
|
2016-07-31 19:46:18 +02:00
|
|
|
s.currentID = nil
|
2014-07-21 22:48:51 +02:00
|
|
|
}
|
|
|
|
|
2016-08-09 04:21:47 +02:00
|
|
|
return s.Next(ctx)
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
|
|
|
|
2014-08-07 02:03:41 +02:00
|
|
|
func (s *BooleanSearcher) Count() uint64 {
|
2014-08-07 01:36:23 +02:00
|
|
|
|
2014-04-25 18:45:23 +02:00
|
|
|
// for now return a worst case
|
2014-09-04 00:47:02 +02:00
|
|
|
var sum uint64
|
2014-04-25 20:47:15 +02:00
|
|
|
if s.mustSearcher != nil {
|
|
|
|
sum += s.mustSearcher.Count()
|
|
|
|
}
|
|
|
|
if s.shouldSearcher != nil {
|
|
|
|
sum += s.shouldSearcher.Count()
|
|
|
|
}
|
2014-04-25 18:45:23 +02:00
|
|
|
return sum
|
|
|
|
}
|
|
|
|
|
2015-03-06 20:46:29 +01:00
|
|
|
func (s *BooleanSearcher) Close() error {
|
2016-09-30 01:51:42 +02:00
|
|
|
var err0, err1, err2 error
|
2014-04-25 18:45:23 +02:00
|
|
|
if s.mustSearcher != nil {
|
2016-09-30 01:51:42 +02:00
|
|
|
err0 = s.mustSearcher.Close()
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
|
|
|
if s.shouldSearcher != nil {
|
2016-09-30 01:51:42 +02:00
|
|
|
err1 = s.shouldSearcher.Close()
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
|
|
|
if s.mustNotSearcher != nil {
|
2016-09-30 01:51:42 +02:00
|
|
|
err2 = s.mustNotSearcher.Close()
|
|
|
|
}
|
|
|
|
if err0 != nil {
|
|
|
|
return err0
|
|
|
|
}
|
|
|
|
if err1 != nil {
|
|
|
|
return err1
|
|
|
|
}
|
|
|
|
if err2 != nil {
|
|
|
|
return err2
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
2015-03-06 20:46:29 +01:00
|
|
|
return nil
|
2014-04-25 18:45:23 +02:00
|
|
|
}
|
2014-08-30 00:14:12 +02:00
|
|
|
|
|
|
|
func (s *BooleanSearcher) Min() int {
|
|
|
|
return 0
|
|
|
|
}
|
2016-08-09 04:21:47 +02:00
|
|
|
|
|
|
|
func (s *BooleanSearcher) DocumentMatchPoolSize() int {
|
|
|
|
rv := 3
|
|
|
|
if s.mustSearcher != nil {
|
|
|
|
rv += s.mustSearcher.DocumentMatchPoolSize()
|
|
|
|
}
|
|
|
|
if s.shouldSearcher != nil {
|
|
|
|
rv += s.shouldSearcher.DocumentMatchPoolSize()
|
|
|
|
}
|
|
|
|
if s.mustNotSearcher != nil {
|
|
|
|
rv += s.mustNotSearcher.DocumentMatchPoolSize()
|
|
|
|
}
|
|
|
|
return rv
|
|
|
|
}
|