core fixes. csv fixes.

This commit is contained in:
Matt Wells
2014-02-05 14:56:22 -08:00
parent ecc10c2cb9
commit d9f0d57c0c
2 changed files with 15 additions and 4 deletions

@ -111,9 +111,6 @@ bool sendReply ( State0 *st , char *reply ) {
g_stats.logAvgQueryTime(st->m_startTime);
mdelete(st, sizeof(State0), "PageResults2");
delete st;
if ( ! savedErr ) { // g_errno ) {
g_stats.m_numSuccess++;
// . one hour cache time... no 1000 hours, basically infinite
@ -137,12 +134,19 @@ bool sendReply ( State0 *st , char *reply ) {
-1, // httpstatus -1 -> 200
NULL, // cookieptr
charset );
// free st after sending reply since "st->m_sb" = "reply"
mdelete(st, sizeof(State0), "PageResults2");
delete st;
return true;
}
// error otherwise
if ( savedErr != ENOPERM )
g_stats.m_numFails++;
mdelete(st, sizeof(State0), "PageResults2");
delete st;
if ( format == FORMAT_XML ) {
SafeBuf sb;
sb.safePrintf("<?xml version=\"1.0\" "

@ -6487,17 +6487,24 @@ void PosdbTable::intersectLists10_r ( ) {
//
// if we have a gbsortby:price term then score exclusively on that
//
if ( m_sortByTermNum >= 0 )
if ( m_sortByTermNum >= 0 ) {
// no term?
if ( ! miniMergedList[m_sortByTermNum] ) goto advance;
score = g_posdb.getFloat ( miniMergedList[m_sortByTermNum] );
}
// skip docid if outside of range
if ( m_minScoreTermNum >= 0 ) {
// no term?
if ( ! miniMergedList[m_minScoreTermNum] ) goto advance;
float score2 = g_posdb.getFloat ( miniMergedList[m_minScoreTermNum] );
if ( score2 < m_minScoreVal ) goto advance;
}
// skip docid if outside of range
if ( m_maxScoreTermNum >= 0 ) {
// no term?
if ( ! miniMergedList[m_maxScoreTermNum] ) goto advance;
float score2 = g_posdb.getFloat ( miniMergedList[m_maxScoreTermNum] );
if ( score2 > m_maxScoreVal ) goto advance;
}