Sha256: 6831506b6d30e5685d47ac69904ca0acc139a6f5f1376aef1432511bd998ac1b

Contents?: true

Size: 531 Bytes

Versions: 26

Compression:

Stored size: 531 Bytes

Contents

#!/usr/bin/env ruby

lib = File.expand_path('../../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require "inquisitio"

# Perform a search against AWS CloudSearch
#
# example usage:
#
# ruby ./bin/search <enddpoint> "Star Wars" "title"

endpoint = ARGV[0]
query = ARGV[1]
return_fields = [ ARGV[2] ]

Inquisitio.config do |config|
  config.search_endpoint = endpoint
end

if return_fields.nil?
  puts Inquisitio.search(query)
else
  puts Inquisitio.search(query, { "return_fields" => return_fields} )
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
inquisitio-1.5.0 bin/search
inquisitio-1.4.1 bin/search
inquisitio-1.4.0 bin/search
inquisitio-1.3.1 bin/search
inquisitio-1.3.0 bin/search
inquisitio-1.2.4 bin/search
inquisitio-1.2.3 bin/search
inquisitio-1.2.2 bin/search
inquisitio-1.2.1 bin/search
inquisitio-1.2.0 bin/search
inquisitio-1.1.2 bin/search
inquisitio-1.1.1 bin/search
inquisitio-1.1.0 bin/search
inquisitio-1.0.0 bin/search
inquisitio-0.2.0 bin/search
inquisitio-0.1.7 bin/search
inquisitio-0.1.6 bin/search
inquisitio-0.1.5 bin/search
inquisitio-0.1.4 bin/search
inquisitio-0.1.3 bin/search