feat:optimize fulltext search ,skip unfinished ftx

This commit is contained in:
Xiao YiFang 2022-06-18 18:50:05 +08:00
parent a5726aead7
commit ff5e3b5778

View file

@ -353,25 +353,13 @@ void FullTextSearchDialog::accept()
distanceBetweenWords,
hasCJK, ignoreWordsOrder ) )
{
// if( hasCJK && ( mode == WholeWords || mode == PlainText ) )
// {
// QMessageBox message( QMessageBox::Warning,
// "GoldenDict",
// tr( "CJK symbols in search string are not compatible with search modes \"Whole words\" and \"Plain text\"" ),
// QMessageBox::Ok,
// this );
// message.exec();
// }
// else
{
QMessageBox message( QMessageBox::Warning,
"GoldenDict",
tr( "The search line must contains at least one word containing " )
QMessageBox message( QMessageBox::Warning,
"GoldenDict",
tr( "The search line must contains at least one word containing " )
+ QString::number( MinimumWordSize ) + tr( " or more symbols" ),
QMessageBox::Ok,
this );
message.exec();
}
QMessageBox::Ok,
this );
message.exec();
return;
}
@ -393,6 +381,10 @@ void FullTextSearchDialog::accept()
for( unsigned x = 0; x < activeDicts.size(); ++x )
{
if( !activeDicts[ x ] ->haveFTSIndex())
{
continue;
}
sptr< Dictionary::DataRequest > req = activeDicts[ x ]->getSearchResults(
ui.searchLine->text(),
mode,