code: def search_advanced(self, index, itype, query):
          '''
          Advanced search interface using specified query
          > query = ElasticQuery().term(user='kimchy')
          > ElasticSearch().search_advanced('twitter','posts',query)
           ... Search results ...
  
          '''
          request = self.session
          url = 'http://%s:%s/%s/%s/_search' % (self.host,self.port,index,itype)
          if self.params:
              query_header = dict(query=query, **self.params)
          else:
              query_header = dict(query=query)
          if self.verbose:
              print query_header
          response = request.post(url,query_header)
  
          return responsf search_advanced(self, index, itype, query):
          '''
          Advanced search interface using specified query
          > query = ElasticQuery().term(user='kimchy')
          > ElasticSearch().search_advanced('twitter','posts',query)
           ... Search results ...
  
          '''
          request = self.session
          url = 'http://%s:%s/%s/%s/_search' % (self.host,self.port,index,itype)
          if self.params:
              query_header = dict(query=query, **self.params)
          else:
              query_header = dict(query=query)
          if self.verbose:
              print query_header
          response = request.post(url,query_header)
  
          return response
docs: Advanced search interface using specified query
          > query = ElasticQuery().term(user='kimchy')
          > ElasticSearch().search_advanced('twitter','posts',query)
           ... Search results ...