Thumbnail file hits. Based on a patch from D Bera
[beagle.git] / beagled / Lucene.Net / Index / TermFreqVector.cs
blob66be277d88c238224066b03e0469881ff026e9d9
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.Index
20 /// <summary>Provides access to stored term vector of
21 /// a document Field.
22 /// </summary>
23 public interface TermFreqVector
25 /// <summary> </summary>
26 /// <returns> The Field this vector is associated with.
27 ///
28 /// </returns>
29 System.String GetField();
31 /// <returns> The number of terms in the term vector.
32 /// </returns>
33 int Size();
35 /// <returns> An Array of term texts in ascending order.
36 /// </returns>
37 System.String[] GetTerms();
40 /// <summary>Array of term frequencies. Locations of the array correspond one to one
41 /// to the terms in the array obtained from <code>getTerms</code>
42 /// method. Each location in the array contains the number of times this
43 /// term occurs in the document or the document Field.
44 /// </summary>
45 int[] GetTermFrequencies();
48 /// <summary>Return an index in the term numbers array returned from
49 /// <code>getTerms</code> at which the term with the specified
50 /// <code>term</code> appears. If this term does not appear in the array,
51 /// return -1.
52 /// </summary>
53 int IndexOf(System.String term);
56 /// <summary>Just like <code>indexOf(int)</code> but searches for a number of terms
57 /// at the same time. Returns an array that has the same size as the number
58 /// of terms searched for, each slot containing the result of searching for
59 /// that term number.
60 ///
61 /// </summary>
62 /// <param name="terms">array containing terms to look for
63 /// </param>
64 /// <param name="start">index in the array where the list of terms starts
65 /// </param>
66 /// <param name="len">the number of terms in the list
67 /// </param>
68 int[] IndexesOf(System.String[] terms, int start, int len);