src/solr_grid_tuning/query_runner.py
def run_searches(self,
                     base_query: SolrQuery,
                     searches: List[str]) -> List[Tuple[str, List[str]]]:
        """Performs queries for each of the given searches by successively setting them on a base query
        """

        results = []
        for search in searches:
            # set the actual search term, handle special case of the query parameter not being 'q'
            if self.query_field == 'q':
                query = dataclasses.replace(base_query, q=search)
            else:
                query_as_special_parameter = (self.query_field, search)
                query_params = (base_query.other_params if base_query.other_params is not None else []) + [
                    query_as_special_parameter]
                query = dataclasses.replace(base_query, other_params=query_params)

            # run the query
            result_ids = self.run_query(query, return_field=self.document_id_field)
            results.append((search, result_ids))
        return results
Performs queries for each of the given searches by successively setting them on a base query
        
Performs queries for each of the given searches by successively setting them on a base query
Performs queries for each of the given searches by successively setting them on a base query
def run_searches(self,
                     base_query: SolrQuery,
                     searches: List[str]) -> List[Tuple[str, List[str]]]:
        results = []
        for search in searches:
            if self.query_field == 'q':
                query = dataclasses.replace(base_query, q=search)
            else:
                query_as_special_parameter = (self.query_field, search)
                query_params = (base_query.other_params if base_query.other_params is not None else []) + [
                    query_as_special_parameter]
                query = dataclasses.replace(base_query, other_params=query_params)
            result_ids = self.run_query(query, return_field=self.document_id_field)
            results.append((search, result_ids))
        return results
def run_searches ( self , base_query : SolrQuery , searches : List [ str ] ) -> List [ Tuple [ str , List [ str ] ] ] : results = [ ] for search in searches : if self . query_field == 'q' : query = dataclasses . replace ( base_query , q = search ) else : query_as_special_parameter = ( self . query_field , search ) query_params = ( base_query . other_params if base_query . other_params is not None else [ ] ) + [ query_as_special_parameter ] query = dataclasses . replace ( base_query , other_params = query_params ) result_ids = self . run_query ( query , return_field = self . document_id_field ) results . append ( ( search , result_ids ) ) return results
Performs queries for each of the given searches by successively setting them on a base query
Performs queries for each of the given searches by successively setting them on a base query
"""Performs queries for each of the given searches by successively setting them on a base query
        """ # set the actual search term, handle special case of the query parameter not being 'q' # run the query
self
base_query
SolrQuery
searches
List[str]