class Polecat::Term
Attributes
field[R]
the field name which should be found
operator[R]
the operator to match the field with the value
value[R]
the search value which get’s matched against the document field
Public Class Methods
new(field, operator, value)
click to toggle source
create a new Term
for a query
# File lib/polecat/term.rb, line 11 def initialize field, operator, value @field = field @operator = operator if @operator == :eq && value.class == String @value = /^#{value}$/ else @value = value end end