예제 #1
0
 def get_queryset(self):
     excluded_fields = list(
         set(WebappIndexer.hidden_fields + WebsiteIndexer.hidden_fields))
     return (Search(using=BaseIndexer.get_es(),
                    index=self._get_indices(),
                    doc_type=self._get_doc_types()).extra(
                        _source={'exclude': excluded_fields}))
예제 #2
0
    def search(cls, using=None):
        """
        Returns a `Search` object.

        We override this to use our patched version which adds statsd timing.
        """
        return Search(using=using or cls.get_es(),
                      index=cls.get_index(),
                      doc_type=cls.get_mapping_type_name())
예제 #3
0
    def search(cls, using=None):
        """
        Returns a `Search` object.

        We override this to use our patched version which adds statsd timing.
        """
        return (Search(using=using or cls.get_es(),
                       index=cls.get_index(),
                       doc_type=cls.get_mapping_type_name()).extra(
                           _source={'exclude': cls.hidden_fields}))
예제 #4
0
 def get_queryset(self):
     excluded_fields = list(
         set(indexers.WebappIndexer.hidden_fields +
             ws_indexers.WebsiteIndexer.hidden_fields +
             e_indexers.ExtensionIndexer.hidden_fields))
     co_filters = self._get_colombia_filter()
     qs = (Search(using=BaseIndexer.get_es(),
                  **self.get_doc_types_and_indices()).extra(
                      _source={'exclude': excluded_fields}))
     if co_filters:
         return qs.filter(co_filters)
     return qs