@Override public int hashCode() { return toString().hashCode(); }
@Override public boolean supports(IndexRef ref) { return ref.toString().startsWith("http"); }
@Override public boolean supports(IndexRef ref) { return ref.toString().startsWith("http"); }
@Override public boolean supports(IndexRef ref) { return ref.toString().contains("#INCREMENTAL"); }
public static boolean isConcurrent(IndexRef ref) { return ref.toString().startsWith(PREFIX); }
public static boolean isConcurrent(IndexRef ref) { return ref.toString().startsWith(PREFIX); }
public static boolean isLocal(IndexRef ref) { String l = ref.toString(); if (l.startsWith("http") || l.startsWith("https")) return false; return true; }
public static boolean isLocal(IndexRef ref) { String l = ref.toString(); if (l.startsWith("http") || l.startsWith("https")) return false; return true; }
@Override public Index load(IndexRef ref) { String l = ref.toString(); File file = new File(l); String path = file.getParent(); String prefix = file.getName().replace(".properties", ""); return IndexOnDisk.createIndex(path, prefix); }
@Override public boolean supports(IndexRef ref) { return IndexFactory.whoSupports(ref) != null && ! ref.toString().startsWith("concurrent:"); //this is a small hack }
@Override public Index load(IndexRef ref) { String l = ref.toString(); File file = new File(l); String path = file.getParent(); String prefix = file.getName().replace(".properties", ""); return IndexOnDisk.createIndex(path, prefix); }
@Override public boolean supports(IndexRef ref) { return IndexFactory.whoSupports(ref) != null && ! ref.toString().startsWith("concurrent:"); //this is a small hack }
@Override public Index load(IndexRef ref) { File file = new File(ref.toString()); String path = file.getParent(); String prefix = file.getName().replace("#INCREMENTAL", ""); return IncrementalIndex.createIndex(path, prefix); }
@Override public boolean supports(IndexRef ref) { return ref.size() == 1 && ref.toString().equals("#memory"); }
protected IndexRef getUnderlyingRef(IndexRef ref) { String underlyinglocation = ref.toString().replaceFirst(PREFIX, ""); return IndexRef.of(underlyinglocation); }
protected IndexRef getUnderlyingRef(IndexRef ref) { String underlyinglocation = ref.toString().replaceFirst(PREFIX, ""); return IndexRef.of(underlyinglocation); }
@Override public boolean supports(IndexRef ref) { String l = ref.toString(); if (ref.size() > 1) return false; //this is a multi-index if (l.startsWith("http") || l.startsWith("https") || l.startsWith("concurrent")) return false; if (! l.endsWith(".properties")) return false; return Files.exists(l); }
@Override public boolean supports(IndexRef ref) { String l = ref.toString(); if (ref.size() > 1) return false; //this is a multi-index if (l.startsWith("http") || l.startsWith("https") || l.startsWith("concurrent")) return false; if (! l.endsWith(".properties")) return false; return Files.exists(l); }
public static IndexRef makeConcurrent(IndexRef ref) { if (IndexFactory.isLoaded(ref)) return new DirectIndexRef( ConcurrentIndexUtils.makeConcurrentForRetrieval( ((DirectIndexRef)ref).underlyingIndex )){ private static final long serialVersionUID = 1L; @Override public String toString() { return PREFIX + super.toString(); } }; return IndexRef.of(PREFIX + ref.toString()); }
public static IndexRef makeConcurrent(IndexRef ref) { if (IndexFactory.isLoaded(ref)) return new DirectIndexRef( ConcurrentIndexUtils.makeConcurrentForRetrieval( ((DirectIndexRef)ref).underlyingIndex )){ private static final long serialVersionUID = 1L; @Override public String toString() { return PREFIX + super.toString(); } }; return IndexRef.of(PREFIX + ref.toString()); }