From 913140ea36c06fb785f05236aadf787fa18c1e09 Mon Sep 17 00:00:00 2001
From: Patrick Plitzner
Date: Tue, 12 Feb 2019 17:19:01 +0100
Subject: [PATCH] ref #8011 Add warning for exceeding search result limit (500)
---
.../taxeditor/view/search/facet/SearchController.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchController.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchController.java
index dead32bed..2ea89091c 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchController.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchController.java
@@ -18,6 +18,8 @@ import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.widgets.Composite;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+
/**
* @author pplitzner
* @since Jan 22, 2019
@@ -42,6 +44,10 @@ public abstract class SearchController, T> implements
searchResults.clear();
searchResults = searchResults(searchString);
+ if(searchResults.size()>500){
+ MessagingUtils.warningDialog("Specify your search", this, "The following search has too many results. Please enter a more specific search query.");
+ return;
+ }
Set facets = createResults(searchResults);
--
2.34.1