# Path: dopplr/basequery.py
# class BaseQuery(object):
#     """
#     Base class for all query implementations.
#     """
# 
#     def get_params(self):
#         """
#         Return the actual params for the query.
#         """
#         raise NotImplemented
# 
# Path: dopplr/solr/query/query.py
# class Query(BaseQuery):
#     """
#     The most simple Solr query: `q`.
#     """
# 
#     def __init__(self, query):
#         """
#         Initialize the query value.
#         """
#         self.__query = query
# 
#     def get_params(self):
#         """
#         Return the list of query params.
#         """
#         return [('q', self.__query)]


from dopplr.basequery import BaseQuery
from dopplr.solr.query import Query

        self.response_mapper = kwargs.get('response_mapper', lambda x: x)
        self.headers = kwargs.get('headers', None)

    def add_param(self, param):
        """
        Directly add a parameter to the `QueryBuilder`. This is intended for
        stuff like `dismax` parametrization etc.

        `param` needs to be a tuple of the form::
            (name, value)
        """
        self.__params.append(param)

    def add_params(self, params):
        """
        Directly add a parameter list to the `QueryBuilder`. This is intended
        for stuff like `dismax` parametrization etc.

        `params` needs to be a list of tuples of the form::
            (name, value)
        """
        self.__params.extend(params)

    def add(self, query):
        """
        Add a query objet to the `QueryBuilder`.
        """
        if not isinstance(query, BaseQuery):
            raise TypeError

# Path: dopplr/basequery.py
# class BaseQuery(object):
#     """
#     Base class for all query implementations.
#     """
# 
#     def get_params(self):
#         """
#         Return the actual params for the query.
#         """
#         raise NotImplemented
# 
# Path: dopplr/solr/query/query.py
# class Query(BaseQuery):
#     """
#     The most simple Solr query: `q`.
#     """
# 
#     def __init__(self, query):
#         """
#         Initialize the query value.
#         """
#         self.__query = query
# 
#     def get_params(self):
#         """
#         Return the list of query params.
#         """
#         return [('q', self.__query)]


# Path: dopplr/solr/querybuilder.py
from dopplr.basequery import BaseQuery
from dopplr.solr.query import Query


        self.response_mapper = kwargs.get('response_mapper', lambda x: x)
        self.headers = kwargs.get('headers', None)

    def add_param(self, param):
        """
        Directly add a parameter to the `QueryBuilder`. This is intended for
        stuff like `dismax` parametrization etc.

        `param` needs to be a tuple of the form::
            (name, value)
        """
        self.__params.append(param)

    def add_params(self, params):
        """
        Directly add a parameter list to the `QueryBuilder`. This is intended
        for stuff like `dismax` parametrization etc.

        `params` needs to be a list of tuples of the form::
            (name, value)
        """
        self.__params.extend(params)

    def add(self, query):
        """
        Add a query objet to the `QueryBuilder`.
        """
        if not isinstance(query, BaseQuery):
            raise TypeError

        if isinstance(query, Query):