Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.737 kB
puts "Start server with 'cd server; thin -p 8080 start'"
puts "(if you haven't done so already)"
puts
require_relative 'model'
require 'picky-client'
client = Picky::Client.new path: '/search'
# This will output nothing on the first run,
# but the server will dump/reload even
# when stopping/starting.
#
p client.search 'surname:mcnama*'
p client.search 'picky'
Model.new(1, 'Picky', 'McNamara').save
Model.new(2, 'Florian', 'Hanke').save
Model.new(3, 'Tentacles', 'Jellyfish').save
p client.search 'surname:mcnama*'
p client.search 'hanke'
Model.new(2, 'Kaspar', 'Schiess').save
Model.new(3, 'Roger', 'Braun').save
p client.search 'hanke' # Not found anymore.
p client.search 'surname:schies*'
p client.search 'roger' # And out.
Jump to Line
Something went wrong with that request. Please try again.