forgot IndexCache.java in the last commit

replaced index service attribute with a category attribute and reduced index attribute names to single characters to reduce memory footprint, t is for term, n is for name, c is for category, l if for link

changed default indexing frequency from 1 minute to 10 minutes to reduce memory use

added arbitrary resource endpoint for index search by issuer name and index prefix

added some additional error handling concerning unrecognized properties in the indices
This commit is contained in:
kennycud 2025-04-03 10:23:58 -07:00
parent a6309e925b
commit 1bd6076e33

View File

@ -1,7 +1,5 @@
package org.qortal.data.arbitrary;
import org.qortal.list.ResourceList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@ -9,6 +7,7 @@ public class IndexCache {
public static final IndexCache SINGLETON = new IndexCache();
private ConcurrentHashMap<String, List<ArbitraryDataIndexDetail>> indicesByTerm = new ConcurrentHashMap<>();
private ConcurrentHashMap<String, List<ArbitraryDataIndexDetail>> indicesByIssuer = new ConcurrentHashMap<>();
public static IndexCache getInstance() {
return SINGLETON;
@ -17,4 +16,8 @@ public class IndexCache {
public ConcurrentHashMap<String, List<ArbitraryDataIndexDetail>> getIndicesByTerm() {
return indicesByTerm;
}
public ConcurrentHashMap<String, List<ArbitraryDataIndexDetail>> getIndicesByIssuer() {
return indicesByIssuer;
}
}