Esempio n. 1
0
def saveQueryStats(query, facets, found, exectime=0, request=None):
    stat = QueryStats()
    stat.userid = _get_userid(request)
    stat.geoinfo = getcountry_code(_get_ipaddress(request))
    stat.query = query
    stat.facets = facets
    stat.found = found
    stat.exectime = exectime
    stat.save()
    LOGGER.debug(u'saveQueryStats q={0}.'.format(query))
Esempio n. 2
0
def saveQueryStats(query, facets, found, exectime=0, request=None):
    stat = QueryStats()
    stat.userid = _get_userid(request)
    stat.geoinfo = getcountry_code(_get_ipaddress(request))
    stat.query = query
    stat.facets = facets
    stat.found = found
    stat.exectime = exectime
    stat.save()
    LOGGER.debug(u"saveQueryStats q={0}.".format(query))
Esempio n. 3
0
def saveQueryStats(userid, field, query, found, exectime=0): 
    stat = QueryStats()
    stat.userid = userid
    stat.field = field
    stat.query = query
    stat.found = found
    stat.exectime = exectime    
    stat.save()
    LOGGER.debug('STATS: Query {0}.'.format(query))