cvsimport
[beagle.git] / beagled / Lucene.Net / Index / TermFreqVector.cs
blobfc33992f8fa337cb1663954fe4f5a0a6d43dc473
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.
17 using System;
19 namespace Lucene.Net.Index
22 /// <summary>Provides access to stored term vector of
23 /// a document field.
24 /// </summary>
25 public interface TermFreqVector
27 /// <summary> </summary>
28 /// <returns> The field this vector is associated with.
29 ///
30 /// </returns>
31 System.String GetField();
33 /// <returns> The number of terms in the term vector.
34 /// </returns>
35 int Size();
37 /// <returns> An Array of term texts in ascending order.
38 /// </returns>
39 System.String[] GetTerms();
42 /// <summary>Array of term frequencies. Locations of the array correspond one to one
43 /// to the terms in the array obtained from <code>getTerms</code>
44 /// method. Each location in the array contains the number of times this
45 /// term occurs in the document or the document field.
46 /// </summary>
47 int[] GetTermFrequencies();
50 /// <summary>Return an index in the term numbers array returned from
51 /// <code>getTerms</code> at which the term with the specified
52 /// <code>term</code> appears. If this term does not appear in the array,
53 /// return -1.
54 /// </summary>
55 int IndexOf(System.String term);
58 /// <summary>Just like <code>indexOf(int)</code> but searches for a number of terms
59 /// at the same time. Returns an array that has the same size as the number
60 /// of terms searched for, each slot containing the result of searching for
61 /// that term number.
62 ///
63 /// </summary>
64 /// <param name="terms">array containing terms to look for
65 /// </param>
66 /// <param name="start">index in the array where the list of terms starts
67 /// </param>
68 /// <param name="len">the number of terms in the list
69 /// </param>
70 int[] IndexesOf(System.String[] terms, int start, int len);