10

I'm interested in using AWS Cloud Search for my web app. I have 3 different document types that I want to make searchable (users - articles - images).

What is the best way to do this with Cloud Search? Do I need to create 3 different AWS search domains? And does this mean i need to pay for at least 3 search instances?

Or can I put all of them in 1 domain / instance and use something like indexes or types (to use elastic search terminology)?

Thanks!

stikkos
  • 1,916
  • 2
  • 19
  • 34

1 Answers1

4

You can try this:

  1. Add a "searchable_text" index of type text, "category" index of type literal which is faceted enabled.
  2. Upload documents of all types with full text search field as "searchable_text" and category as one of "users", "articles" or "images".
  3. Query based on category to return results from each type.

If your search query is going to be complex with many index fields, you may end up having a lot of null values in many indexed fields if you try to maintain a single domain for different document types. Empty values are not good for indexes and it's better to separate document types into their own domains if you end up there.

Emil
  • 1,240
  • 1
  • 15
  • 27
  • Thanks for your suggestion but it is exactly because i want to avoid "empty fields" (my documents are all completely different), i was hoping for a better solution... In ElasticSearch, you can group documents in indexes or types, but i don't think it is possible with Cloud Search – stikkos Apr 10 '13 at 10:32
  • I was looking for the same thing. I guess the fact CloudSearch is still in beta comes into play here. That being said, I feel you should still tick Emil's response as the answer. – IanBussieres Jun 27 '13 at 12:43
  • 4
    Can someone answer this sub-question: Can you have multiple "search domains" within a single "search instance"? Say I don't have a lot of traffic, I don't think I should need a different virtual machines of each document type... – Nathan H Aug 02 '13 at 13:30
  • 4
    @nute , it's not possible to have multiple search domains on the same instance. – Emil Aug 03 '13 at 05:09