Exemple #1
0
 internal LazyInitTermMatchScorer(TermsMatchQuery parent, IndexReader reader, IState state, Similarity similarity) : base(similarity)
 {
     _parent     = parent;
     _reader     = reader;
     _state      = state;
     _similarity = similarity;
 }
Exemple #2
0
 public RavenTermsFilteredTermEnum(TermsMatchQuery termsMatchQuery, IndexReader reader)
 {
     this._termsMatchQuery = termsMatchQuery;
     this._reader          = reader;
     if (this._termsMatchQuery.Matches.Count == 0)
     {
         _endEnum = true;
         return;
     }
     MoveToCurrentTerm();
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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();
            }
Exemple #6
0
 public TermMatchQueryWeight(TermsMatchQuery parent, Searcher searcher)
 {
     _parent   = parent;
     _searcher = searcher;
 }