# HG changeset patch
# User Arthur Lutz <arthur.lutz@logilab.fr>
# Date 1463662368 -7200
#      Thu May 19 14:52:48 2016 +0200
# Node ID 8d60eed5f124f766fe5a6559524272bbc2b301bf
# Parent  aea1ea565d4ef4f8a510a788e57a4d1b7b20f791
[views] don't repeat search =, use changed methods

diff --git a/views.py b/views.py
--- a/views.py
+++ b/views.py
@@ -49,13 +49,14 @@
         else:
             es = Elasticsearch()
         search = Search(using=es, index=index_name,
-                        doc_type=indexable_types(self._cw.vreg.schema))
-        search = search.query('multi_match',
-                              query=query_string,
-                              fields=("title^3", "name^3", "content^2", "_all",))
-        search = search.highlight('content')
-        search = search.highlight_options(pre_tags="", post_tags="", fragment_size=150)
-
+                        doc_type=indexable_types(self._cw.vreg.schema)) \
+                        .query('multi_match',  # noqa
+                               query=query_string,
+                               fields=("title^3", "name^3", "content^2", "_all",)) \
+                        .highlight('content') \
+                        .highlight_options(pre_tags="",
+                                           post_tags="",
+                                           fragment_size=150)
         try:
             response = search.execute()
         except NotFoundError: