Logo Search packages:      
Sourcecode: qt4-x11 version File versions

TCHAR * MultiTermQuery::toString ( const TCHAR *  field  )  const [virtual, inherited]

Prints a user-readable version of this query.

Implements Query.

Definition at line 83 of file MultiTermQuery.cpp.

References QSqlRecord::append(), and Query::getBoost().

                                                           {
        StringBuffer buffer;

        if ( field==NULL || _tcscmp(term->field(),field)!=0 ) {
            buffer.append(term->field());
            buffer.append( _T(":"));
        }
        buffer.append(term->text());
        if (getBoost() != 1.0f) {
            buffer.appendChar ( '^' );
            buffer.appendFloat( getBoost(),1);
        }
        return buffer.toString();
    }


Generated by  Doxygen 1.6.0   Back to index