Class: Lucene::FuzzyOp

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/parser.rb,
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb

Overview

we don’t support fuzzy string matching

Instance Method Summary collapse

Instance Method Details

#to_arrayObject



178
179
180
181
182
183
184
185
186
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb', line 178

def to_array
  a = self.elements[0].to_array
  param = self.elements[1]
  if param
    "(OP:~ #{a} #{param.to_array})"
  else
    "(OP:~ #{a})"
  end
end

#transformObject



188
189
190
191
192
193
194
195
196
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb', line 188

def transform
  a = self.elements[0].transform
  param = self.elements[1]
  if param
    "#{a}~#{param.transform}"
  else
    "#{a}~"
  end
end