blob: c7caa9acc8ff9ebf2081b51c8971fefa6189e691 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.query;
/**
* Ordered NearItem.
* <p>
* Matches as a near operator, but also demands that the operands have the
* same order in the document as in the query.
*
* @author bratseth
*/
public class ONearItem extends NearItem {
/** Creates a ordered NEAR item with limit 2 */
public ONearItem() {
setDistance(2);
}
/**
* Creates a ordered near item which matches if there are at most <code>distance</code>
* separation between the words, in the right direction.
*/
public ONearItem(int distance) {
super(distance);
}
public ItemType getItemType() {
return ItemType.ONEAR;
}
public String getName() {
return "ONEAR";
}
}
|