def index(self, *index):
    "\n        Set the index for the search. If called empty it will remove all information.\n\n        Example:\n\n            s = Search()\n            s = s.index('twitter-2015.01.01', 'twitter-2015.01.02')\n            s = s.index(['twitter-2015.01.01', 'twitter-2015.01.02'])\n        "
    s = self._clone()
    if (not index):
        s._index = None
    else:
        indexes = []
        for i in index:
            if isinstance(i, string_types):
                indexes.append(i)
            elif isinstance(i, list):
                indexes += i
            elif isinstance(i, tuple):
                indexes += list(i)
        s._index = ((self._index or []) + indexes)
    return s
Set the index for the search. If called empty it will remove all information.

Example:

    s = Search()
    s = s.index('twitter-2015.01.01', 'twitter-2015.01.02')
    s = s.index(['twitter-2015.01.01', 'twitter-2015.01.02'])
def index(self, *index):
    "\n        Set the index for the search. If called empty it will remove all information.\n\n        Example:\n\n            s = Search()\n            s = s.index('twitter-2015.01.01', 'twitter-2015.01.02')\n            s = s.index(['twitter-2015.01.01', 'twitter-2015.01.02'])\n        "
    s = self._clone()
    if (not index):
        s._index = None
    else:
        indexes = []
        for i in index:
            if isinstance(i, string_types):
                indexes.append(i)
            elif isinstance(i, list):
                indexes += i
            elif isinstance(i, tuple):
                indexes += list(i)
        s._index = ((self._index or []) + indexes)
    return s