AWS CloudSearch: different documents in 1 domain?
Asked Answered
K

1

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!

Knuckleduster answered 3/4, 2013 at 20:15 Comment(2)
Did you find a better way to solve your problem, I'm looking for a solution too.Caputo
I'm using ec2 hosted elastic search instancesKnuckleduster
P
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.

Penzance answered 10/4, 2013 at 9:58 Comment(4)
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 SearchKnuckleduster
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.Phytoplankton
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...Invasive
@nute , it's not possible to have multiple search domains on the same instance.Penzance

© 2022 - 2024 — McMap. All rights reserved.