estraier
Interface Condition


public interface Condition

Abstraction of search condition.


Field Summary
static int CONDAGIT
          option: check N-gram keys skipping by three
static int CONDFAST
          option: check N-gram keys skipping by two
static int CONDNOIDF
          option: without TF-IDF tuning
static int CONDSIMPLE
          option: with the simplified phrase
static int CONDSURE
          option: check every N-gram key
static int CONDUSU
          option: check N-gram keys skipping by one
 
Method Summary
 void add_attr(java.lang.String expr)
          Add an expression for an attribute.
 java.util.List attrs()
          Get expressions for attributes.
 int max()
          Get the maximum number of retrieval.
 int options()
          Get options of retrieval.
 java.lang.String order()
          Get the order expression.
 java.lang.String phrase()
          Get the search phrase.
 void set_max(int max)
          Set the maximum number of retrieval.
 void set_options(int options)
          Set options of retrieval.
 void set_order(java.lang.String expr)
          Set the order.
 void set_phrase(java.lang.String phrase)
          Set the search phrase.
 

Field Detail

CONDAGIT

public static final int CONDAGIT
option: check N-gram keys skipping by three

See Also:
Constant Field Values

CONDFAST

public static final int CONDFAST
option: check N-gram keys skipping by two

See Also:
Constant Field Values

CONDNOIDF

public static final int CONDNOIDF
option: without TF-IDF tuning

See Also:
Constant Field Values

CONDSIMPLE

public static final int CONDSIMPLE
option: with the simplified phrase

See Also:
Constant Field Values

CONDSURE

public static final int CONDSURE
option: check every N-gram key

See Also:
Constant Field Values

CONDUSU

public static final int CONDUSU
option: check N-gram keys skipping by one

See Also:
Constant Field Values
Method Detail

add_attr

public void add_attr(java.lang.String expr)
Add an expression for an attribute.

Parameters:
expr - an expression for an attribute.

attrs

public java.util.List attrs()
Get expressions for attributes.

Returns:
expressions for attributes.

max

public int max()
Get the maximum number of retrieval.

Returns:
the maximum number of retrieval.

options

public int options()
Get options of retrieval.

Returns:
options by bitwise or.

order

public java.lang.String order()
Get the order expression.

Returns:
the order expression.

phrase

public java.lang.String phrase()
Get the search phrase.

Returns:
the search phrase.

set_max

public void set_max(int max)
Set the maximum number of retrieval.

Parameters:
max - the maximum number of retrieval. By default, the number of retrieval is not limited.

set_options

public void set_options(int options)
Set options of retrieval.

Parameters:
options - options: `Condition.ESTCONDSURE' specifies that it checks every N-gram key, `Condition.ESTCONDUSU', which is the default, specifies that it checks N-gram keys with skipping one key, `Condition.ESTCONDFAST' skips two keys, `Condition.ESTCONDAGIT' skips three keys, `Condition.ESTCONDNOIDF' specifies not to perform TF-IDF tuning, `Condition.ESTCONDSIMPLE' specifies to use simplified phrase. Each option can be specified at the same time by bitwise or. If keys are skipped, though search speed is improved, the relevance ratio grows less.

set_order

public void set_order(java.lang.String expr)
Set the order.

Parameters:
expr - an expression for the order. By default, the order is by score descending.

set_phrase

public void set_phrase(java.lang.String phrase)
Set the search phrase.

Parameters:
phrase - a search phrase.