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
.Index
20 /// <summary>Provides access to stored term vector of
23 public interface TermFreqVector
25 /// <summary> </summary>
26 /// <returns> The Field this vector is associated with.
29 System
.String
GetField();
31 /// <returns> The number of terms in the term vector.
35 /// <returns> An Array of term texts in ascending order.
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.
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,
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
62 /// <param name="terms">array containing terms to look for
64 /// <param name="start">index in the array where the list of terms starts
66 /// <param name="len">the number of terms in the list
68 int[] IndexesOf(System
.String
[] terms
, int start
, int len
);