示例#1
0
 internal LazyInitTermMatchScorer(TermsMatchQuery parent, IndexReader reader, IState state, Similarity similarity) : base(similarity)
 {
     _parent     = parent;
     _reader     = reader;
     _state      = state;
     _similarity = similarity;
 }
示例#2
0
 public RavenTermsFilteredTermEnum(TermsMatchQuery termsMatchQuery, IndexReader reader)
 {
     this._termsMatchQuery = termsMatchQuery;
     this._reader          = reader;
     if (this._termsMatchQuery.Matches.Count == 0)
     {
         _endEnum = true;
         return;
     }
     MoveToCurrentTerm();
 }
示例#3
0
 public RavenTermsFilteredTermEnum(TermsMatchQuery termsMatchQuery, IndexReader reader, IState state)
 {
     _termsMatchQuery = termsMatchQuery;
     _reader          = reader;
     _state           = state;
     if (_termsMatchQuery.Matches.Count == 0)
     {
         _endEnum = true;
         return;
     }
     MoveToCurrentTerm(state);
 }
示例#4
0
 private bool Equals(TermsMatchQuery other)
 {
     if (Matches.Count != other.Matches.Count)
     {
         return(false);
     }
     for (int i = 0; i < Matches.Count; i++)
     {
         if (Matches[i] != other.Matches[i])
         {
             return(false);
         }
     }
     return(base.Equals(other) && Field == other.Field);
 }
示例#5
0
            internal EagerTermMatchScorer(TermsMatchQuery parent, IndexReader reader, IState state, Similarity similarity) : base(similarity)
            {
                _docs = new FastBitArray(reader.MaxDoc);

                foreach (string match in parent.Matches)
                {
                    using var termDocs = reader.TermDocs(new Term(parent.Field, match), state);
                    while (termDocs.Next(state))
                    {
                        _docs.Set(termDocs.Doc);
                    }
                }

                _enum = _docs.Iterate(0).GetEnumerator();
            }
示例#6
0
 public TermMatchQueryWeight(TermsMatchQuery parent, Searcher searcher)
 {
     _parent   = parent;
     _searcher = searcher;
 }