Thumbnail file hits. Based on a patch from D Bera
[beagle.git] / beagled / Lucene.Net / Search / FieldDoc.cs
blobe55bd4f5e8a9c9fa5bbd4eca504d26a7f0a28aba
1 /*
2 * Copyright 2004 The Apache Software Foundation
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
16 using System;
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.
30 ///
31 /// <p>Created: Feb 11, 2004 1:23:38 PM
32 ///
33 /// </summary>
34 /// <author> Tim Jones (Nacimiento Software)
35 /// </author>
36 /// <since> lucene 1.4
37 /// </since>
38 /// <version> $Id: FieldDoc.cs,v 1.1 2005/01/17 19:54:30 joeshaw Exp $
39 /// </version>
40 /// <seealso cref="ScoreDoc">
41 /// </seealso>
42 /// <seealso cref="TopFieldDocs">
43 /// </seealso>
44 [Serializable]
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.
52 /// </summary>
53 /// <seealso cref="Sort">
54 /// </seealso>
55 /// <seealso cref="Searchable#Search(Query,Filter,int,Sort)">
56 /// </seealso>
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)
67 this.fields = fields;