Пример #1
0
            public MultiPhraseWeight(MultiPhraseQuery enclosingInstance, Searcher searcher)
            {
                InitBlock(enclosingInstance);
                this.similarity = Enclosing_Instance.GetSimilarity(searcher);

                // compute idf
                int maxDoc = searcher.MaxDoc;

                foreach (Term[] terms in enclosingInstance.termArrays)
                {
                    foreach (Term term in terms)
                    {
                        idf += similarity.Idf(searcher.DocFreq(term), maxDoc);
                    }
                }
            }
Пример #2
0
			public MultiPhraseWeight(MultiPhraseQuery enclosingInstance, Searcher searcher)
			{
				InitBlock(enclosingInstance);
				this.similarity = Enclosing_Instance.GetSimilarity(searcher);
				
				// compute idf
			    int maxDoc = searcher.MaxDoc;
                foreach (Term[] terms in enclosingInstance.termArrays)
                {
                    foreach (Term term in terms)
                    {
                        idf += similarity.Idf(searcher.DocFreq(term), maxDoc);
                    }
                }
			}
Пример #3
0
 public override float Idf(int docFreq, int numDocs)
 {
     return(delegee.Idf(docFreq, numDocs));
 }