Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I connect to an existing CloudSearch domain in boto?

I'm just starting to work with boto to connect to Amazon CloudSearch.

I got the examples working, but I can't find any examples of connecting to an existing domain, all the examples create a new domain.

Poking around, I found get_domain, but that fails if I call it on the connection object.

>>> conn.get_domain('foo')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Layer2' object has no attribute 'get_domain'

Any suggestions as to how I can connect to an existing domain?

[edit] I started from this: http://boto.cloudhackers.com/en/latest/cloudsearch_tut.html

So, all I'm doing this

import boto
conn = boto.connect_cloudsearch()
like image 343
ThoughtfulHacking Avatar asked Oct 06 '12 19:10

ThoughtfulHacking


People also ask

How do I use CloudSearch?

To start searching your data with Amazon CloudSearch, you simply take the following steps: Create and configure a search domain. Upload and index the data you want to search. Send search requests to your domain.

Is Amazon CloudSearch deprecated?

Yes. Existing search domains created with the 2011-02-01 version of Amazon CloudSearch will continue to work.

What does Amazon CloudSearch enable you to do?

The Amazon CloudSearch console enables you to easily create, configure, and monitor your search domains, upload documents, and run test searches. Using the console is the easiest way to get started with Amazon CloudSearch and provides a central command center for ongoing management of your search domains.

What is facet in CloudSearch?

A facet is an index field that represents a category that you want to use to refine and filter search results. When you submit search requests to Amazon CloudSearch, you can request facet information to find out how many documents share the same value in a particular field.


1 Answers

You can either do conn.list_domains() which will return a list of Domain objects for all of your current domains or you can do conn.lookup('foo') which will return a Domain object for the specified domain name.

like image 189
garnaat Avatar answered Nov 14 '22 16:11

garnaat