本文整理汇总了C#中Lucene.Net.Search.Weight.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Weight.GetValue方法的具体用法?C# Weight.GetValue怎么用?C# Weight.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lucene.Net.Search.Weight
的用法示例。
在下文中一共展示了Weight.GetValue方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MatchAllScorer
internal MatchAllScorer(MatchAllDocsQuery enclosingInstance, IndexReader reader, Similarity similarity, Weight w, byte[] norms):base(similarity)
{
InitBlock(enclosingInstance);
this.termDocs = reader.TermDocs(null);
score = w.GetValue();
this.norms = norms;
}
示例2: phraseFreq
private float freq; //prhase frequency in current doc as computed by phraseFreq().
internal PhraseScorer(Weight weight, TermPositions[] tps, int[] offsets, Similarity similarity, byte[] norms):base(similarity)
{
this.norms = norms;
this.weight = weight;
this.value_Renamed = weight.GetValue();
// convert tps to a list of phrase positions.
// note: phrase-position differs from term-position in that its position
// reflects the phrase offset: pp.pos = tp.pos - offset.
// this allows to easily identify a matching (exact) phrase
// when all PhrasePositions have exactly the same position.
for (int i = 0; i < tps.Length; i++)
{
PhrasePositions pp = new PhrasePositions(tps[i], offsets[i]);
if (last != null)
{
// add next to end of list
last.next = pp;
}
else
{
first = pp;
}
last = pp;
}
pq = new PhraseQueue(tps.Length); // construct empty pq
first.doc = - 1;
}
示例3: MatchAllScorer
internal MatchAllScorer(MatchAllDocsQuery enclosingInstance, IndexReader reader, Similarity similarity, Weight w):base(similarity)
{
InitBlock(enclosingInstance);
this.reader = reader;
id = - 1;
maxId = reader.MaxDoc() - 1;
score = w.GetValue();
}
示例4: TermScorer
/// <summary> Construct a <code>TermScorer</code>.
///
/// </summary>
/// <param name="weight">The weight of the <code>Term</code> in the query.
/// </param>
/// <param name="td">An iterator over the documents matching the <code>Term</code>.
/// </param>
/// <param name="similarity">The <code>Similarity</code> implementation to be used for score
/// computations.
/// </param>
/// <param name="norms">The field norms of the document fields for the <code>Term</code>.
/// </param>
public /*internal*/ TermScorer(Weight weight, TermDocs td, Similarity similarity, byte[] norms):base(similarity)
{
this.weight = weight;
this.termDocs = td;
this.norms = norms;
this.weightValue = weight.GetValue();
for (int i = 0; i < SCORE_CACHE_SIZE; i++)
scoreCache[i] = GetSimilarity().Tf(i) * weightValue;
}
示例5: PhraseScorer
internal PhraseScorer(Weight weight, TermPositions[] tps, int[] positions, Similarity similarity, byte[] norms) : base(similarity)
{
this.norms = norms;
this.weight = weight;
this.value_Renamed = weight.GetValue();
// convert tps to a list
for (int i = 0; i < tps.Length; i++)
{
PhrasePositions pp = new PhrasePositions(tps[i], positions[i]);
if (last != null)
{
// add next to end of list
last.next = pp;
}
else
first = pp;
last = pp;
}
pq = new PhraseQueue(tps.Length); // construct empty pq
}
示例6: ConstantScorer
public ConstantScorer(ConstantScoreQuery enclosingInstance, Similarity similarity, IndexReader reader, Weight w):base(similarity)
{
InitBlock(enclosingInstance);
theScore = w.GetValue();
DocIdSet docIdSet = Enclosing_Instance.filter.GetDocIdSet(reader);
if (docIdSet == null)
{
docIdSetIterator = DocIdSet.EMPTY_DOCIDSET.Iterator();
}
else
{
DocIdSetIterator iter = docIdSet.Iterator();
if (iter == null)
{
docIdSetIterator = DocIdSet.EMPTY_DOCIDSET.Iterator();
}
else
{
docIdSetIterator = iter;
}
}
}
示例7: ConstantScorer
public ConstantScorer(ConstantScoreQuery enclosingInstance, Similarity similarity, IndexReader reader, Weight w)
: base(similarity)
{
InitBlock(enclosingInstance);
theScore = w.GetValue();
bits = Enclosing_Instance.filter.Bits(reader);
}
示例8: ConstantScorer
public ConstantScorer(ConstantScoreQuery enclosingInstance, Similarity similarity, IndexReader reader, Weight w)
: base(similarity)
{
InitBlock(enclosingInstance);
theScore = w.GetValue();
docIdSetIterator = Enclosing_Instance.filter.GetDocIdSet(reader).Iterator();
}