2 * Copyright 2004 The Apache Software Foundation
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 namespace Lucene
.Net
.Search
19 /// <summary> Expert: A ScoreDoc which also contains information about
20 /// how to sort the referenced document. In addition to the
21 /// document number and score, this object contains an array
22 /// of values for the document from the Field(s) used to sort.
23 /// For example, if the sort criteria was to sort by fields
24 /// "a", "b" then "c", the <code>fields</code> object array
25 /// will have three elements, corresponding respectively to
26 /// the term values for the document in fields "a", "b" and "c".
27 /// The class of each element in the array will be either
28 /// Integer, Float or String depending on the type of values
29 /// in the terms of each Field.
31 /// <p>Created: Feb 11, 2004 1:23:38 PM
34 /// <author> Tim Jones (Nacimiento Software)
36 /// <since> lucene 1.4
38 /// <version> $Id: FieldDoc.cs,v 1.1 2005/01/17 19:54:30 joeshaw Exp $
40 /// <seealso cref="ScoreDoc">
42 /// <seealso cref="TopFieldDocs">
45 public class FieldDoc
: ScoreDoc
48 /// <summary>Expert: The values which are used to sort the referenced document.
49 /// The order of these will match the original sort criteria given by a
50 /// Sort object. Each Object will be either an Integer, Float or String,
51 /// depending on the type of values in the terms of the original Field.
53 /// <seealso cref="Sort">
55 /// <seealso cref="Searchable#Search(Query,Filter,int,Sort)">
57 public System
.IComparable
[] fields
;
59 /// <summary>Expert: Creates one of these objects with empty sort information. </summary>
60 public FieldDoc(int doc
, float score
) : base(doc
, score
)
64 /// <summary>Expert: Creates one of these objects with the given sort information. </summary>
65 public FieldDoc(int doc
, float score
, System
.IComparable
[] fields
) : base(doc
, score
)