(qs) Speed

This commit is contained in:
Viktor Lofgren 2023-10-23 14:03:09 +02:00
parent e4bddb4993
commit 487c016a32
2 changed files with 2 additions and 3 deletions

View File

@ -5,12 +5,10 @@ import com.google.inject.Singleton;
import nu.marginalia.index.client.model.query.SearchSpecification;
import nu.marginalia.index.client.model.results.DecoratedSearchResultItem;
import nu.marginalia.query.client.QueryClient;
import nu.marginalia.query.model.QueryParams;
import nu.marginalia.query.model.QueryResponse;
import nu.marginalia.search.model.UrlDetails;
import nu.marginalia.search.results.SearchResultDecorator;
import nu.marginalia.search.results.UrlDeduplicator;
import nu.marginalia.client.Context;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;

View File

@ -1,5 +1,6 @@
package nu.marginalia.search.svc;
import io.reactivex.rxjava3.schedulers.Schedulers;
import nu.marginalia.assistant.client.AssistantClient;
import nu.marginalia.client.exception.RemoteException;
import nu.marginalia.client.Context;
@ -70,7 +71,7 @@ public class SearchUnitConversionService {
logger.info("eval({})", expr);
try {
return assistantClient.evalMath(context, expr).toFuture();
return assistantClient.evalMath(context, expr).subscribeOn(Schedulers.io()).toFuture();
}
catch (RemoteException ex) {
return null;