Mickaël Leger
Mickaël Leger

Reputation: 3440

How to search value that often change with Cloudsearch?

I'm new with Cloudsearch and my question might not be clear so I will try to explain my problem.

We have a backoffice were lot of people make research and time to time our database is KO because of some request that take more than 30s to execute, so we decide to use Cloudsearch because we already use some other Amazon web service.

So I created a search domain, I created the index according to the value we search in our current database and I indexed all our event (result of what people search) according to our test database (~ 42 000 row).

My problem is that each event have multiple media (.jpg, .gif and .mp4) in our database (and we are migrating from v3 to v4 so there is two media database and we need to know the event version to know where we should search : the old or the new database) so my question : Can I return some media information with Cloudsearch or I will still need to use a mysql request?

Right now we return the last media add in database (so he can change a lot of time if the event is running) and the total number of media of this event (that can change really often too).

What I think might work :

I saw the documentation for "Using Dynamic Fields in Amazon Cloudsearch" but I don't think it does what I want to achieve...maybe I missunderstand something, but if someone can help me to understand how to do it the best way I would be thankful.

Upvotes: 0

Views: 85

Answers (1)

dmbaughman
dmbaughman

Reputation: 608

Can I return some media information with Cloudsearch or I will still need to use a mysql request?

If you are asking whether you can store .mp4, .jpg, etc. media files in CloudSearch, the answer is no. You can store text, numbers, dates, and latlong coordinates (or arrays of any of those, except latlong).

I think the conventional way to handle media is to index a URL/path to the media as a text field.

Reference: AWS Cloudsearch Documentation - Configuring Index Fields

Upvotes: 0

Related Questions