"""
yield resultlist.main(total=total, recordIds=recordIds, bitMatrixRow=bitMatrixRow, duration=duration, cqlQuery=cqlQuery, httpQuery=httpQuery, arguments=arguments, *args, **kwargs)
yield """
|
import searchform, resultlist, drilldown #import cqlparser, cqlwebutils #def createCqlQuery(query, drilldownargs): # q = cqlwebutils.parseCqlFromWeb(query) # if q.isEmpty(): # q.add('meresco.exists') # q.add('true') # q.EXACT() # for fieldAndTerm in drilldownargs: # field, term = drilldown.fieldAndTermSplit(fieldAndTerm) # q.add(field) # q.add(term) # q.EXACT() # q.AND() # # cqlQuery = str(q) # return cqlQuery def main(headers={}, arguments={}, *args, **kwargs): httpQuery = arguments.get('query', [''])[0] sortBy = sortDescending = None sortKeys = any.configuration().get('defaultSortKeys', None) if sortKeys: sortBy, ignored, sortDescending = sortKeys.split(',') sortDescending = sortDescending == '1' # cqlQuery = createCqlQuery(httpQuery, arguments.get('drilldown', [])) # parsetree = cqlparser.parseString(cqlQuery) drilldownArguments = arguments.get('drilldown', []) parsetree, cqlQuery = any.parseQuery(httpQuery, drilldownArguments) t0 = time() total, recordIds = any.executeCQL(parsetree, sortBy=sortBy, sortDescending=sortDescending) bitMatrixRow = any.bitMatrixRow(cqlAbstractSyntaxTree=parsetree) duration = time() - t0 yield """
"""
yield resultlist.main(total=total, recordIds=recordIds, bitMatrixRow=bitMatrixRow, duration=duration, cqlQuery=cqlQuery, httpQuery=httpQuery, arguments=arguments, *args, **kwargs)
yield """
|