estraier.pure
Class Condition

java.lang.Object
  extended byestraier.pure.Condition

public class Condition
extends java.lang.Object

Abstraction of search condition.


Field Summary
static int AGITO
          option: check N-gram keys skipping by three
static int FAST
          option: check N-gram keys skipping by two
static int NOIDF
          option: without TF-IDF tuning
static int SIMPLE
          option: with the simplified phrase
static int SURE
          option: check every N-gram key
static int USUAL
          option: check N-gram keys skipping by one
 
Constructor Summary
Condition()
          Create a search condition object.
 
Method Summary
 void add_attr(java.lang.String expr)
          Add an expression for an attribute.
 void set_auxiliary(int min)
          Set permission to adopt result of the auxiliary index.
 void set_mask(int mask)
          Set the mask of targets of meta search.
 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.
 void set_skip(int skip)
          Set the number of skipped documents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AGITO

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


FAST

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


NOIDF

public static int NOIDF
option: without TF-IDF tuning


SIMPLE

public static int SIMPLE
option: with the simplified phrase


SURE

public static int SURE
option: check every N-gram key


USUAL

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

Constructor Detail

Condition

public Condition()
Create a search condition object.

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.

set_auxiliary

public void set_auxiliary(int min)
Set permission to adopt result of the auxiliary index.

Parameters:
min - the minimum hits to adopt result of the auxiliary index. If it is not more than 0, the auxiliary index is not used. By default, it is 32.

set_mask

public void set_mask(int mask)
Set the mask of targets of meta search.

Parameters:
mask - a masking number. 1 means the first target, 2 means the second target, 4 means the third target and, power values of 2 and their summation compose the mask.

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.SURE' specifies that it checks every N-gram key, `Condition.USUAL', which is the default, specifies that it checks N-gram keys with skipping one key, `Condition.FAST' skips two keys, `Condition.AGITO' skips three keys, `Condition.NOIDF' specifies not to perform TF-IDF tuning, `Condition.SIMPLE' 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.

set_skip

public void set_skip(int skip)
Set the number of skipped documents.

Parameters:
skip - the number of documents to be skipped in the search result.