Class: Qiita::Elasticsearch::HierarchalToken
- Defined in:
- lib/qiita/elasticsearch/hierarchal_token.rb
Instance Attribute Summary
Attributes inherited from Token
Instance Method Summary collapse
Methods inherited from Token
#downcased?, #downcased_term, #filter?, #initialize, #must?, #must_not?, #negative?, #or?, #positive?, #proper_cased_term, #query?, #quoted?, #sort?, #to_s, #type?
Constructor Details
This class inherits a constructor from Qiita::Elasticsearch::Token
Instance Method Details
#to_hash ⇒ Hash
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/qiita/elasticsearch/hierarchal_token.rb', line 7 def to_hash { "bool" => { "should" => [ { "prefix" => { @field_name => proper_cased_term + "/", }, }, { "term" => { @field_name => proper_cased_term, }, }, ], }, } end |