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