/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
namespace Lucene.Net.Search.Payloads
{
/// An abstract class that defines a way for Payload*Query instances
/// to transform the cumulative effects of payload scores for a document.
///
///
/// for more information
///
///
/// This class and its derivations are experimental and subject to change
///
///
///
[Serializable]
public abstract class PayloadFunction
{
/// Calculate the score up to this point for this doc and field
/// The current doc
///
/// The field
///
/// The start position of the matching Span
///
/// The end position of the matching Span
///
/// The number of payloads seen so far
///
/// The current score so far
///
/// The score for the current payload
///
/// The new current Score
///
///
///
///
public abstract float CurrentScore(int docId, System.String field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore);
/// Calculate the final score for all the payloads seen so far for this doc/field
/// The current doc
///
/// The current field
///
/// The total number of payloads seen on this document
///
/// The raw score for those payloads
///
/// The final score for the payloads
///
public abstract float DocScore(int docId, System.String field, int numPayloadsSeen, float payloadScore);
abstract public override int GetHashCode();
abstract public override bool Equals(System.Object o);
}
}