This is an automated email from the ASF dual-hosted git repository.
tonysun83 pushed a commit to branch prototype/fdb-layer
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/prototype/fdb-layer by this
push:
new 7e7a3f6 add test to make sure type <<"text">> design docs are ignored
(#2866)
7e7a3f6 is described below
commit 7e7a3f6651ea33643ea506d6786fe30f17ef4617
Author: Tony Sun <[email protected]>
AuthorDate: Tue May 5 08:46:05 2020 -0700
add test to make sure type <<"text">> design docs are ignored (#2866)
---
src/mango/test/16-index-selectors-test.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mango/test/16-index-selectors-test.py
b/src/mango/test/16-index-selectors-test.py
index 4510065..cde8438 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"}}