0

I've been using the appengine python experimental searchAPI. It works great. With release 1.7.3 I updated all of the deprecated methods. However, I am now getting this warning:

DeprecationWarning: consistency is deprecated. GLOBALLY_CONSIST

However, I'm not sure how to address it in my code. Can anyone point me in the right direction?

Haldean Brown
  • 12,411
  • 5
  • 43
  • 58

1 Answers1

0

This depends on whether or not you have any globally consistent indexes. If you do, then you should migrate all of your data from those indexes to new, per-document-consistent (which is the default) indexes. To do this:

  • Loop through the documents you have stored in the global index and reindexing them in the new index.
  • Change references from the global index to the new per-document index.
  • Ensure everything works, then delete the documents from your global index (not necessary to complete the migration, but still a good idea).

You then should remove any mention of consistency from your code; the default is per-document consistent, and eventually we will remove the ability to specify a consistency at all.

If you don't have any data in a globally consistent index, you're probably getting the warning because you're specifying a consistency. If you stop specifying the consistency it should go away.

Note that there is a known issue with the Python API that causes a lot of erroneous deprecation warnings about consistency, so you could be seeing that as well. That issue will be fixed in the next release.

Haldean Brown
  • 12,411
  • 5
  • 43
  • 58