Parent

Class/Module Index [+]

Quicksearch

Lucene::Field

Public Instance Methods

to_array() click to toggle source
# File lib/chef/solr_query/lucene_nodes.rb, line 35
def to_array
  field = self.elements[0].text_value
  term = self.elements[1].to_array
  "(F:#{field} #{term})"
end
transform() click to toggle source
# File lib/chef/solr_query/lucene_nodes.rb, line 41
def transform
  field = self.elements[0].text_value
  term = self.elements[1]
  if term.is_a? Phrase
    str = term.transform
    # remove quotes
    str = str[1 ... (str.length - 1)]
    "content:\"#{field}#{SEP}#{str}\""
  else
    "content:#{field}#{SEP}#{term.transform}"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.