summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Sun <tony.sun427@gmail.com>2020-05-04 12:01:11 -0700
committerTony Sun <tony.sun427@gmail.com>2020-05-04 12:01:11 -0700
commitaea4ba0e90e4b513a9bb99ebbc34b5891e619d04 (patch)
tree8df8de8dbc6e5d48a56d55551fa219f1fd4d7928
parentbd44fc6a44148fe2327962341c1e3d4bb8f7db27 (diff)
downloadcouchdb-aea4ba0e90e4b513a9bb99ebbc34b5891e619d04.tar.gz
add test to make sure type <<"text">> design docs are ignoredarchive/include-text-index-testinclude-text-index-test
-rw-r--r--src/mango/test/16-index-selectors-test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mango/test/16-index-selectors-test.py b/src/mango/test/16-index-selectors-test.py
index 4510065f5..cde8438fc 100644
--- a/src/mango/test/16-index-selectors-test.py
+++ b/src/mango/test/16-index-selectors-test.py
@@ -246,6 +246,14 @@ class IndexSelectorJson(mango.DbPerClass):
docs = self.db.find(selector, use_index="oldschooltext")
self.assertEqual(len(docs), 3)
+ def test_text_old_index_not_used(self):
+ selector = {"location": {"$gte": "FRA"}}
+ self.db.save_doc(oldschoolddoctext)
+ resp = self.db.find(selector, explain=True)
+ self.assertEqual(resp["index"]["name"], "_all_docs")
+ docs = self.db.find(selector)
+ self.assertEqual(len(docs), 3)
+
@unittest.skipUnless(mango.has_text_service(), "requires text service")
def test_text_old_selector_still_supported_via_api(self):
selector = {"location": {"$gte": "FRA"}}