def __getitem__(self, name): """ Convenience method for retrieving a solr collection :param name: the name of the collection :type name: str :return: SolrCollection """ return collection.SolrCollection(self, name)
def create_collection(self, collname, *args, **kwargs): r""" Create a collection. :param collname: The collection name :param \*args: additiona arguments :param \*\*kwargs: additional named parameters """ coll = collection.SolrCollection(self, collname) return coll.create(*args, **kwargs)
def create_collection(self, collname, *args, **kwargs): r""" Create a collection. :param collname: The collection name :type collname: str :param \*args: additional arguments :param \*\*kwargs: additional named parameters :return: the created collection :rtype: SolrCollection """ coll = collection.SolrCollection(self, collname) return coll.create(*args, **kwargs)
def __getitem__(self, name): return collection.SolrCollection(self, name)
def __getattr__(self, name): return collection.SolrCollection(self, name)