Ejemplo n.º 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);
                    }
                }
            }
Ejemplo n.º 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);
                    }
                }
			}
Ejemplo n.º 3
0
 public override float Idf(int docFreq, int numDocs)
 {
     return(delegee.Idf(docFreq, numDocs));
 }