mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
feat:optimize fulltext search ,skip unfinished ftx
This commit is contained in:
parent
a5726aead7
commit
ff5e3b5778
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue