Does using the Search API essentially (though not nominally) limit the number of Documents I may have on my server?

StackOverflow https://stackoverflow.com/questions/23318201

Question

Newbie alert: Trying to use the App-engine Search API on a new project, I have read through the introduction. I hope I am wrong and I do ask that someone corrects me, but here is my understanding:

If I have a bookstore and I want to use the Search API, then it is sensible to have one index that includes all the books so that users can query against my entire inventory. Hence, each book would represent a Document. Therefore, my bookstore may not comprise more than 10GB of books?! Please, someone, tell me there is a workaround.

In my case, users must be able to add reviews. So if my users are chatty, as I hope they will be, I may run out of the 10GB very quickly.

I have been thinking of some possible workarounds, but they do not make much sense to me. For instance, I could link documents such that document Book would be

Title -- String
Price -- Number
Reviews -- index //where review is an index of reviews on this book

so in this case a query on the index of books_index would have to cascade to the set of all review indices (one for each book).

OR I could get all the book documents and iterating through each, search the reviews for each book and from there assemble a final result set.

Clearly I am asking for help because I don't like any of my proposals as they each seem wasteful. Will someone please propose a better workaround? Perhaps someone who has done this before.

My hope is to come up with a model that does not restrict the number of book Documents I may have in my store, such that each Book [document] has an infinite number of reviews (so to speak). Where the invariant must be that a visitor may query against my entire inventory.

Was it helpful?

Solution

You need a million reviews before you exceed 10GB - I doubt it will happen quickly. When you do get a million, chances are that Google will increase this limit. If they don't, you can split your data into several indexes - this limit applies per index, not per application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top