code: def as_encodable(self, index_name):
          
          if self.facets:
              encoded_facets = {}
              for name, facet in self.facets.items():
                  encoded_facets[name] = facet.encodable
              self._json_['facets'] = encoded_facets
  
          if self._ms:
              # Encode according to scan vectors..
              sv_val = {
                  'level': 'at_plus',
                  'vectors': {
                      index_name: self._ms._to_fts_encodable()
                  }
              }
              self._json_.setdefault('ctl', {})['consistency'] = sv_val
  
          if self.sort:
              if isinstance(self.sort, Sort):
                  self._json_['sort'] = self.sort.as_encodable()
              else:
                  self._json_['sort'] = self.sort
  
          return self._json_
docs: :param index_name: The name of the index for the query
          :return: A dict suitable for passing to `json.dumps()`