blob: 13673144a0ae96d2ee0106ecd70f3352de393551 (
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
37
38
39
40
41
42
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.query;
/**
* An interface used for anything which represents a single block
* of query input.
*
* @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
*/
public interface BlockItem extends HasIndexItem {
/**
* The untransformed raw text from the user serving as base for
* this item.
*/
String getRawWord();
/** Returns the substring which is the origin of this item, or null if none */
public Substring getOrigin();
/** Returns the value of this term as a string */
public abstract String stringValue();
/**
* Is this block of text conceptually from the user query?
*/
boolean isFromQuery();
boolean isStemmed();
/**
* Does this item represent "usual words"?
*/
boolean isWords();
/**
* If the block has to be resegmented, what operator should be chosen if it
* is necessary to change operator?
*/
SegmentingRule getSegmentingRule();
}
|