Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search and try client libraries for the Amazon CloudSearch #61

Open
piroor opened this issue Jul 11, 2012 · 8 comments
Open

Search and try client libraries for the Amazon CloudSearch #61

piroor opened this issue Jul 11, 2012 · 8 comments
Assignees

Comments

@piroor
Copy link
Member

piroor commented Jul 11, 2012

There are some client libraries for the AmazonCloudSearch, on the Web. We have to test our Groonga CloudSearch's compatible APIs with various type clients.

@ghost ghost assigned darashi Jul 19, 2012
@darashi
Copy link
Member

darashi commented Jul 19, 2012

@darashi
Copy link
Member

darashi commented Jul 19, 2012

Search worked with the following code:

#!/usr/bin/env ruby

require 'aws_cloud_search'

module AWSCloudSearch
  def self.search_url(domain, region="us-east-1")
    "http://search-#{domain}.#{region}.127.0.0.1.xip.io:7575"
  end

  def self.document_url(domain, region="us-east-1")
    "http://doc-#{domain}.#{region}.127.0.0.1.xip.io:7575"
  end

  def self.configuration_url
    "https://cloudsearch.us-east-1.127.0.0.1.xip.io:7575"
  end
end


cloud_search = AWSCloudSearch::CloudSearch.new('example-00000000000000000000000000')

search_request = AWSCloudSearch::SearchRequest.new
search_request.q = "tokyo"

search_response = cloud_search.search(search_request)

puts "%d found" % search_response.found

search_response.hits.each do |hit|
  p hit
end

@darashi
Copy link
Member

darashi commented Jul 19, 2012

For rails users, Tinia may be better? https://github.com/dlangevin/tinia

(Tinia wraps aws_cloud_search)

@darashi
Copy link
Member

darashi commented Jul 19, 2012

As Tinia uses "bq" parameter for querying, GCS couldn't work with it at this time.

See https://github.com/dlangevin/tinia/blob/master/lib/tinia/search.rb#L74-88

@darashi
Copy link
Member

darashi commented Jul 19, 2012

With aws_cloud_search, documents can be added something like this:

batch = AWSCloudSearch::DocumentBatch.new
doc = AWSCloudSearch::Document.new(true)
doc.id = 'id11'
doc.add_field :name, 'Snowy Snowy'
doc.add_field :address, 'Sapporo, Hokkaido, Japan'

batch.add_document doc
cloud_search.documents_batch(batch)

@darashi
Copy link
Member

darashi commented Aug 1, 2012

"a Ruby wrapper for AWS CloudSearch." https://github.com/duwanis/asari

@darashi
Copy link
Member

darashi commented Aug 1, 2012

Asari also does not support the configuration API at this time. Docs api and Search API only.

@piroor
Copy link
Member Author

piroor commented Aug 3, 2012

Sample client implemented in Python
https://gist.github.com/2367039

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants