Class: Estraier::Condition

Inherits:
Object
  • Object
show all
Defined in:
lib/estraier/estraier-doc.rb

Overview


++ Abstraction of search condition.


Constant Summary collapse

SURE =

option: check every N-gram key

1 << 0
USUAL =

option: check N-gram keys skipping by one

1 << 1
FAST =

option: check N-gram keys skipping by two

1 << 2
AGITO =

option: check N-gram keys skipping by three

1 << 3
NOIDF =

option: without TF-IDF tuning

1 << 4
SIMPLE =

option: with the simplified phrase

1 << 10
ROUGH =

option: with the rough phrase

1 << 11
UNION =

option: with the union phrase

1 << 15
ISECT =

option: with the intersection phrase

1 << 16
ECLSIMURL =

eclipse tuning: consider URL

10.0
ECLSERV =

eclipse tuning: on server basis

100.0
ECLDIR =

eclipse tuning: on directory basis

101.0
ECLFILE =

eclipse tuning: on file basis

102.0

Instance Method Summary collapse

Instance Method Details

#add_attr(expr) ⇒ Object

Add an expression for an attribute. ‘expr’ specifies an expression for an attribute. The return value is always ‘nil’.



175
176
177
# File 'lib/estraier/estraier-doc.rb', line 175

def add_attr(expr)
  # native code ...
end

#set_auxiliary(min) ⇒ Object

Set permission to adopt result of the auxiliary index. ‘min’ specifies 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. The return value is always ‘nil’.



214
215
216
# File 'lib/estraier/estraier-doc.rb', line 214

def set_auxiliary(min)
  # native code ...
end

#set_distinct(name) ⇒ Object

Set the attribute distinction filter. ‘name’ specifies the name of an attribute to be distinct. The return value is always ‘nil’.



231
232
# File 'lib/estraier/estraier-doc.rb', line 231

def set_distinct(name)
end

#set_eclipse(limit) ⇒ Object

Set the lower limit of similarity eclipse. ‘limit’ specifies the lower limit of similarity for documents to be eclipsed. Similarity is between 0.0 and 1.0. If the limit is added by ‘Condition::ECLSIMURL’, similarity is weighted by URL. If the limit is ‘Condition::ECLSERV’, similarity is ignored and documents in the same server are eclipsed. If the limit is ‘Condition::ECLDIR’, similarity is ignored and documents in the same directory are eclipsed. If the limit is ‘Condition::ECLFILE’, similarity is ignored and documents of the same file are eclipsed. The return value is always ‘nil’.



225
226
227
# File 'lib/estraier/estraier-doc.rb', line 225

def set_eclipse(limit)
  # native code ...
end

#set_mask(mask) ⇒ Object

Set the mask of targets of meta search. ‘mask’ specifies 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. The return value is always ‘nil’.



237
238
239
# File 'lib/estraier/estraier-doc.rb', line 237

def set_mask(mask)
  # native code ...
end

#set_max(max) ⇒ Object

Set the maximum number of retrieval. ‘max’ specifies the maximum number of retrieval. By default, the number of retrieval is not limited. The return value is always ‘nil’.



188
189
190
# File 'lib/estraier/estraier-doc.rb', line 188

def set_max(max)
  # native code ...
end

#set_options(options) ⇒ Object

Set options of retrieval. ‘options’ specifies options: ‘Condition::SURE’ specifies that it checks every N-gram key, ‘Condition::USU’, 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, ‘Condition::ROUGH’ specifies to use rough phrase, ‘Condition::UNION’ specifies to use union phrase, ‘Condition::ISECT’ specifies to use intersection 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. The return value is always ‘nil’.



207
208
209
# File 'lib/estraier/estraier-doc.rb', line 207

def set_options(options)
  # native code ...
end

#set_order(expr) ⇒ Object

Set the order of a condition object. ‘expr’ specifies an expression for the order. By default, the order is by score descending. The return value is always ‘nil’.



181
182
183
# File 'lib/estraier/estraier-doc.rb', line 181

def set_order(expr)
  # native code ...
end

#set_phrase(phrase) ⇒ Object

Set the search phrase. ‘phrase’ specifies a search phrase. The return value is always ‘nil’.



169
170
171
# File 'lib/estraier/estraier-doc.rb', line 169

def set_phrase(phrase)
  # native code ...
end

#set_skip(skip) ⇒ Object

Set the number of skipped documents. ‘skip’ specifies the number of documents to be skipped in the search result. The return value is always ‘nil’.



194
195
196
# File 'lib/estraier/estraier-doc.rb', line 194

def set_skip(skip)
  # native code ...
end