garrensmith commented on a change in pull request #894: Mango text index test
fixes
URL: https://github.com/apache/couchdb/pull/894#discussion_r145085397
##########
File path: src/mango/test/12-use-correct-index-test.py
##########
@@ -68,15 +68,15 @@ def test_choose_index_with_two(self):
self.assertEqual(explain["index"]["ddoc"], '_design/bbb')
def test_choose_index_alphabetically(self):
- self.db.create_index(["name", "age", "user_id"], ddoc="aaa")
- self.db.create_index(["name", "age", "location"], ddoc="bbb")
+ self.db.create_index(["name"], ddoc="aaa")
+ self.db.create_index(["name"], ddoc="bbb")
self.db.create_index(["name"], ddoc="zzz")
explain = self.db.find({"name": "Eddie", "age": {"$gte": 12}},
explain=True)
self.assertEqual(explain["index"]["ddoc"], '_design/aaa')
def test_choose_index_most_accurate(self):
- self.db.create_index(["name", "location", "user_id"], ddoc="aaa")
- self.db.create_index(["name", "age", "user_id"], ddoc="bbb")
+ self.db.create_index(["name", "age", "user_id"], ddoc="aaa")
+ self.db.create_index(["name", "age"], ddoc="_design/bbb")
Review comment:
This test is failing. you don't need the `_design` here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services