NeedIndexError ? Please help

689 views
Skip to first unread message

hotwater

unread,
Apr 1, 2011, 12:55:19 PM4/1/11
to Google App Engine
I have this error message :

NeedIndexError: The index for this query is not ready to serve. See
the Datastore Indexes page in the Admin Console.

This query needs this index:
- kind: POI
properties:
- name: __searchable_text_index
- name: __searchable_text_index
- name: date
direction: desc
In the app engine admin page, Datastore Indexes showing

__searchable_text_index , __searchable_text_index , date Error

What is actually happpening and how do I solve the problem?

Please help, if you would like to check on the live error please visit
http://8.scoutearth.appspot.com/search?x=20&y=15&phrase=cafe+in+the+park

Calvin

unread,
Apr 1, 2011, 1:07:17 PM4/1/11
to google-a...@googlegroups.com
If you go to the dashboard for your app you'll see a "Datastore Indexes" link on the left side.  This will show you a list of your indexes, and their current state.  It sounds like App Engine is currently working on building the indexes for this model, and you won't be able to complete this query until it's done.

hotwater

unread,
Apr 1, 2011, 1:39:50 PM4/1/11
to Google App Engine
Thanks for the help

PandaSuit

unread,
Apr 1, 2011, 10:47:55 PM4/1/11
to Google App Engine
You are going to have lots of trouble with any index that contains the
same property more than once. Based on your index I am guessing you
are implementing search with a list property called
__searchable_text_index that contains a bunch of search terms are you
are doing an equality filter against that property. If I am wrong just
feel free to ignore the rest of this post.

On the dev server this will work fine no matter how many equality
filters you use in a single query however on the production server it
will require an index for each number of equality filters and the
production server will fail to create those indexes because it does
not seem to support an index with more than one entry for the same
property.

This is a little tricky. If you want to filter with multiple equality
filters on the same property like that you are not able to filter on
any other property or sort on any other property in the same query.

Multiple solutions for this have been found but none are perfect. The
search solution that I use is gae-search by Bill Katz:
http://www.billkatz.com/2009/6/Simple-Full-Text-Search-for-App-Engine

You still won't be able to have the sort inside the same query as the
filter, you will need to sort after you have fetched the results.

I hope that helps. Good luck.

- Bryce

sreenath sirimala

unread,
Nov 14, 2016, 10:48:05 AM11/14/16
to Google App Engine
Hi,

I'm using only one equality filter, still getting the same error.
below is the taceback output
Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/apps/s~msitis-148511/1.397050026593184821/main.py", line 2405, in get
    courses = CourseEnrolled.query(CourseEnrolled.status == "Incomplete").order(CourseEnrolled.roll_number).fetch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/utils.py", line 160, in positional_wrapper
    return wrapped(*args, **kwds)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/query.py", line 1218, in fetch
    return self.fetch_async(limit, **q_options).get_result()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 383, in get_result
    self.check_success()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 427, in _help_tasklet_along
    value = gen.throw(exc.__class__, exc, tb)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/query.py", line 995, in _run_to_list
    batch = yield rpc
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 513, in _on_rpc_completion
    result = rpc.get_result()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 613, in get_result
    return self.__get_result_hook(self)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/datastore/datastore_query.py", line 2921, in __query_result_hook
    yaml_index=yaml, xml_index=xml)
NeedIndexError: The index for this query is not ready to serve. See the Datastore Indexes page in the Admin Console.
The suggested index for this query is:
- kind: CourseEnrolled
  properties:
  - name: status
  - name: roll_number

Alex Martelli

unread,
Nov 14, 2016, 11:07:32 AM11/14/16
to google-a...@googlegroups.com
You're apparently reviving a thread from 5 years and 6 months ago -- it will be difficult for anybody trying to help to get full context about the issue, particularly as software releases etc may well have changed during this long span of time. Could you please instead open a new thread with all the information needed to reproduce your problem as directly and concisely as practical? This will likely make it much less problematic to try and offer help.


Alex


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/3bf2ba98-0dee-4bad-af92-edbc6b547929%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages