google-app-engine


Query by multiple doc_ids in Google App Engine Search API


I want to retrieve a list of documents from a list of doc_ids. Something akin to doing the following in SQL:
SELECT * FROM Documents WHERE id IN (1,2,3,167,91)
I see this method in the documentation, but that only retrieves a single document. For efficiency, I want to do a batch retrieval. Is this possible?
I don't think there's a batch get function, but there is an async version (search https://cloud.google.com/appengine/docs/python/refdocs/google.appengine.api.search.search for get_async), so you could do something like (untested pseudo-code):
# query for docs ids in advance
futures = []
for id_ in doc_ids:
futures.append(index.get_async(id_))
# dereference the futures when you need them
ids = [x.get_result() for x in futures]

Related Links

Can I receive incoming mail with Google App Engine on a non-default version?
GAE always on feature = static VIP?
GAE/J request log format breakdown
Handling URLs in App Engine
Exceeded soft memory limit with basic SELECT
Appengine application as OpenId provider. Is it possible?
How to set CSS style colors in GWT
How do I suppress App Engine logging while running unit tests?
Google App Engine: Java version of the python deferred library?
Appengine Datastore Advantages [closed]
Are crons executed globally or per app instance (i.e. load dependent)?
AppEngine as WebService and S3 as storage
Setting cookie in LiftFilter
Send Emails From AppEngine Locally
ImportError: cannot import name taskqueue
gwt appengine - user service return page

Categories

HOME
embedded
phantom-dsl
fabricjs
alexa-skills-kit
google-spreadsheet
knitr
can
rendering
cakephp-3.4
vsm
octave
mel
appcelerator-studio
libc
plink
do-while
http-post
internationalization
mvc-mini-profiler
xmonad
bourbon
gmm
database-connection
mongoid6
event-store
xunit
licensing
ceylon
sqlpackage
sqsh
magento-1.8
send
aws-codecommit
scatter3d
mustache
sql-server-2000
playstation-portable
autolisp
jwplayer6
magento-1.9.2.4
kill
resolution
laravel-elixir
angular-http
openresty
gitlist
facebook-pixel
manova
insight
azure-cli
ngmaterial
dt
template-toolkit
cmp
universal-analytics
stax
qtplugin
resourcemanager
jboss-tools
scaffolding
gogs
simevents
cycle2
asyncdisplaykit
binomial-theorem
.bash-profile
mod-proxy
sha512
graphics2d
keyup
mraid
shopizer
dbaccess
sonarqube-5.0
webfinger
tweenlite
encryption-asymmetric
cancellation
tinyxml
square-bracket
c++builder-xe5
ebay-lms
neos-server
mvc-editor-templates
dopostback
vfs
zope.interface
saleslogix
faye
node-redis
htdocs
fsevents
automationelement
clrstoredprocedure
quotation-marks
tmx
jqueryform
zen
blender-2.49
lxr
unmanagedresources
technical-debt

Resources

Encrypt Message