(query, result)
Return the doc from an item in the query response.
Return the doc from an item in the query response.
Return the doc from an item in the query response .
def normalize_result(query, result):
        """Return the doc from an item in the query response."""
        if query._exclude_source:
            return result['_id']
        if query._legacy_fields:
            return flatten_field_dict(result, fields_property='_source')
        else:
            return result['_source']
def normalize_result ( query , result ) : if query . _exclude_source : return result [ '_id' ] if query . _legacy_fields : return flatten_field_dict ( result , fields_property = '_source' ) else : return result [ '_source' ]