Ejemplo n.º 1
0
 def create_index(cls):
     """
     Create an Indexs for the "page_id" attribute
     """
     with cloudant(USERNAME, PASSWORD, url=URL) as client:
         clouddb = CloudantDatabase(client, DBNAME)
         clouddb.create_query_index(index_name='pageid-index',
                                    index_type='text',
                                    fields=[{
                                        "name": "page_id",
                                        "type": "string"
                                    }])