(self, query_analysis, indexes)
return OrderedDict([('indexStatus', coverage),
                            ('fullIndexes', full_indexes),
                            ('partialIndexes', partial_indexes)])
Compares a query signature to the index cache to identify complete
            and partial indexes available to the query
Compares a query signature to the index cache to identify complete
            and partial indexes available to the query
Compares a query signature to the index cache to identify complete and partial indexes available to the query
def _generate_index_analysis(self, query_analysis, indexes):
        """Compares a query signature to the index cache to identify complete
            and partial indexes available to the query"""
        needs_recommendation = True
        full_indexes = []
        partial_indexes = []
        coverage = "unknown"

        if indexes is not None:
            for index_key in indexes.keys():
                index = indexes[index_key]
                index_report = self._generate_index_report(index,
                                                           query_analysis)
                if index_report['supported'] is True:
                    if index_report['coverage'] == 'full':
                        full_indexes.append(index_report)
                        if index_report['idealOrder']:
                            needs_recommendation = False
                    elif index_report['coverage'] == 'partial':
                        partial_indexes.append(index_report)

        if len(full_indexes) > 0:
            coverage = "full"
        elif (len(partial_indexes)) > 0:
            coverage = "partial"
        elif query_analysis['supported']:
            coverage = "none"

        # INDEX ANALYSIS
        return OrderedDict([('indexStatus', coverage),
                            ('fullIndexes', full_indexes),
                            ('partialIndexes', partial_indexes)])
def _generate_index_analysis ( self , query_analysis , indexes ) : needs_recommendation = True full_indexes = [ ] partial_indexes = [ ] coverage = "unknown" if indexes is not None : for index_key in indexes . keys ( ) : index = indexes [ index_key ] index_report = self . _generate_index_report ( index , query_analysis ) if index_report [ 'supported' ] is True : if index_report [ 'coverage' ] == 'full' : full_indexes . append ( index_report ) if index_report [ 'idealOrder' ] : needs_recommendation = False elif index_report [ 'coverage' ] == 'partial' : partial_indexes . append ( index_report ) if len ( full_indexes ) > 0 : coverage = "full" elif ( len ( partial_indexes ) ) > 0 : coverage = "partial" elif query_analysis [ 'supported' ] : coverage = "none" # INDEX ANALYSIS return OrderedDict ( [ ( 'indexStatus' , coverage ) , ( 'fullIndexes' , full_indexes ) , ( 'partialIndexes' , partial_indexes ) ] )