Пример #1
0
 protected internal virtual void  ProcessPayload(Similarity similarity)
 {
     if (positions.IsPayloadAvailable())
     {
         payload      = positions.GetPayload(payload, 0);
         payloadScore = Enclosing_Instance.Enclosing_Instance.function.CurrentScore(doc, Enclosing_Instance.Enclosing_Instance.term.Field(), spans.Start(), spans.End(), payloadsSeen, payloadScore, similarity.ScorePayload(doc, Enclosing_Instance.Enclosing_Instance.term.Field(), spans.Start(), spans.End(), payload, 0, positions.GetPayloadLength()));
         payloadsSeen++;
     }
     else
     {
         // zero out the payload?
     }
 }
Пример #2
0
 /// <summary> By default, uses the {@link PayloadFunction} to score the payloads, but
 /// can be overridden to do other things.
 ///
 /// </summary>
 /// <param name="payLoads">The payloads
 /// </param>
 /// <param name="start">The start position of the span being scored
 /// </param>
 /// <param name="end">The end position of the span being scored
 ///
 /// </param>
 /// <seealso cref="Spans">
 /// </seealso>
 protected internal virtual void  ProcessPayloads(System.Collections.Generic.ICollection <byte[]> payLoads, int start, int end)
 {
     foreach (byte[] thePayload in payLoads)
     {
         payloadScore = Enclosing_Instance.function.CurrentScore(doc, Enclosing_Instance.fieldName, start, end, payloadsSeen, payloadScore, similarity.ScorePayload(doc, Enclosing_Instance.fieldName, spans.Start(), spans.End(), thePayload, 0, thePayload.Length));
         ++payloadsSeen;
     }
 }
Пример #3
0
				protected internal virtual void  ProcessPayload(Similarity similarity)
				{
					if (positions.IsPayloadAvailable())
					{
						payload = positions.GetPayload(payload, 0);
						payloadScore = Enclosing_Instance.Enclosing_Instance.function.CurrentScore(doc, Enclosing_Instance.Enclosing_Instance.term.Field(), spans.Start(), spans.End(), payloadsSeen, payloadScore, similarity.ScorePayload(doc, Enclosing_Instance.Enclosing_Instance.term.Field(), spans.Start(), spans.End(), payload, 0, positions.GetPayloadLength()));
						payloadsSeen++;
					}
					else
					{
						// zero out the payload?
					}
				}