Exemplo n.º 1
0
        def create_query_object():
            """
            Nested method which returns a Query object for the given query string, page number and page length attributes from the parent method.
            """
            query_object = Query(query_text)
            query_object.skip = page
            query_object.top = page_len

            response = self.__search_interface.issue_query(query_object)
            query_object.response = response

            return query_object
Exemplo n.º 2
0
        def create_query_object():
            """
            Nested method which returns a Query object for the given query string, page number and page length attributes from the parent method.
            """
            query_object = Query(query_text)
            query_object.skip = page
            query_object.top = page_len

            response = self._search_interface.issue_query(query_object)
            query_object.response = response

            return query_object
Exemplo n.º 3
0
    def issue_query(self, text, page=1, pagelen=100):
        """ Creates a Query object, issues query to the search engine, attaches response to query object
        :param text: query string
        :param page: integer
        :param pagelen: integer
        :return: ifind.search.Query
        """
        q = Query(text)
        q.skip = page
        q.top = pagelen
        response = self.si.issue_query(q)
        q.response = response

        return q