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
.Search
.Spans
22 /// <summary>Expert: an enumeration of span matches. Used to implement span searching.
23 /// Each span represents a range of term positions within a document. Matches
24 /// are enumerated in order, by increasing document number, within that by
25 /// increasing start position and finally by increasing end position.
27 public interface Spans
29 /// <summary>Move to the next match, returning true iff any such exists. </summary>
32 /// <summary>Skips to the first match beyond the current, whose document number is
33 /// greater than or equal to <i>target</i>. <p>Returns true iff there is such
34 /// a match. <p>Behaves as if written: <pre>
35 /// boolean skipTo(int target) {
39 /// } while (target > doc());
43 /// Most implementations are considerably more efficient than that.
45 bool SkipTo(int target
);
47 /// <summary>Returns the document number of the current match. Initially invalid. </summary>
50 /// <summary>Returns the start position of the current match. Initially invalid. </summary>
53 /// <summary>Returns the end position of the current match. Initially invalid. </summary>