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.
19 namespace Lucene
.Net
.Search
23 /// <summary> Expert: A ScoreDoc which also contains information about
24 /// how to sort the referenced document. In addition to the
25 /// document number and score, this object contains an array
26 /// of values for the document from the field(s) used to sort.
27 /// For example, if the sort criteria was to sort by fields
28 /// "a", "b" then "c", the <code>fields</code> object array
29 /// will have three elements, corresponding respectively to
30 /// the term values for the document in fields "a", "b" and "c".
31 /// The class of each element in the array will be either
32 /// Integer, Float or String depending on the type of values
33 /// in the terms of each field.
35 /// <p>Created: Feb 11, 2004 1:23:38 PM
38 /// <author> Tim Jones (Nacimiento Software)
40 /// <since> lucene 1.4
42 /// <version> $Id: FieldDoc.cs,v 1.3 2006/10/02 17:09:02 joeshaw Exp $
44 /// <seealso cref="ScoreDoc">
46 /// <seealso cref="TopFieldDocs">
49 public class FieldDoc
: ScoreDoc
52 /// <summary>Expert: The values which are used to sort the referenced document.
53 /// The order of these will match the original sort criteria given by a
54 /// Sort object. Each Object will be either an Integer, Float or String,
55 /// depending on the type of values in the terms of the original field.
57 /// <seealso cref="Sort">
59 /// <seealso cref="Searcher.Search(Query,Filter,int,Sort)">
61 public System
.IComparable
[] fields
;
63 /// <summary>Expert: Creates one of these objects with empty sort information. </summary>
64 public FieldDoc(int doc
, float score
) : base(doc
, score
)
68 /// <summary>Expert: Creates one of these objects with the given sort information. </summary>
69 public FieldDoc(int doc
, float score
, System
.IComparable
[] fields
) : base(doc
, score
)