示例#1
0
 def test_query_gen(self):
     '''
     Tests the method to get copy fields from Solr.
     '''
     reindexer = Reindexer(source=self.solr, source_coll=self.colls[0], dest=self.solr, dest_coll='doesntmatter')
     self.assertEqual(reindexer._get_query('cursor'),
                      {'cursorMark': 'cursor', 'rows': reindexer._rows, 'q': '*:*', 'sort': 'id desc'})
示例#2
0
 def test_query_gen_pershard_distrib(self):
     '''
     Tests the method to get copy fields from Solr.
     '''
     reindexer = Reindexer(source=self.solr, source_coll=self.colls[0], dest=self.solr, dest_coll='doesntmatter',
                           per_shard=True)
     q = reindexer._get_query('cursor')
     self.assertTrue('distrib' in q and q['distrib'] == 'false')
示例#3
0
 def test_query_gen(self):
     """
     Tests the method to get copy fields from Solr. 
     """
     reindexer = Reindexer(source=self.solr, source_coll=self.colls[0], dest=self.solr, dest_coll="doesntmatter")
     self.assertEqual(
         reindexer._get_query("cursor"),
         {"cursorMark": "cursor", "rows": reindexer._rows, "q": "*:*", "sort": "id desc"},
     )