do not allow search results with more than 100k docs
a) they take a long time to compute b) danger of OOM c) they should drill down
This commit is contained in:
@@ -129,6 +129,9 @@ public class TagsToFile implements AutoCloseable {
|
||||
final List<TagSpecificBaseDir> result = new ArrayList<>();
|
||||
|
||||
final List<Doc> searchResult = db.search(query);
|
||||
if (searchResult.size() > 100_000){
|
||||
throw new IllegalStateException("Too many results.");
|
||||
}
|
||||
|
||||
for (final Doc document : searchResult) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user