Skip to content

twinslash/tire-suggest_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Addition for Tire to work with suggester plugin for elasticsearch: https://github.com/spinscale/elasticsearch-suggest-plugin.

Now it's just build-it-fast-and-check-if-it-works version. Stay tune for updates.

Usage

Searching for suggestions

Tire.suggest('cars', field: 'name.suggest', term: 'au').suggestions
#=> ["audi", "audi 100", "audi 200", "audi 80", "audi 90", "audi a2", "audi a3", "audi a4", "audi a5", "audi a6"]

Searching by several indices

Tire.suggest ['cars', 'ads'] do
  field 'name'
  term 'bmw x'
end.suggestions
#=> ["bmw x3", "bmw x5"]

About

Addition for Tire to work with suggester plugin for elasticsearch: https://github.com/spinscale/elasticsearch-suggest-plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages