1 package org.apache.lucene.search; 2 3 18 19 import org.apache.lucene.index.IndexReader; 20 import java.io.IOException ; 21 22 31 public interface FieldCache { 32 33 34 public static final int STRING_INDEX = -1; 37 38 39 40 public static class StringIndex { 41 42 43 public final String [] lookup; 44 45 46 public final int[] order; 47 48 49 public StringIndex (int[] values, String [] lookup) { 50 this.order = values; 51 this.lookup = lookup; 52 } 53 } 54 55 58 public interface IntParser { 59 60 public int parseInt(String string); 61 } 62 63 64 67 public interface FloatParser { 68 69 public float parseFloat(String string); 70 } 71 72 73 public static FieldCache DEFAULT = new FieldCacheImpl(); 74 75 76 85 public int[] getInts (IndexReader reader, String field) 86 throws IOException ; 87 88 98 public int[] getInts (IndexReader reader, String field, IntParser parser) 99 throws IOException ; 100 101 110 public float[] getFloats (IndexReader reader, String field) 111 throws IOException ; 112 113 123 public float[] getFloats (IndexReader reader, String field, 124 FloatParser parser) throws IOException ; 125 126 135 public String [] getStrings (IndexReader reader, String field) 136 throws IOException ; 137 138 147 public StringIndex getStringIndex (IndexReader reader, String field) 148 throws IOException ; 149 150 161 public Object getAuto (IndexReader reader, String field) 162 throws IOException ; 163 164 175 public Comparable [] getCustom (IndexReader reader, String field, SortComparator comparator) 176 throws IOException ; 177 } 178 | Popular Tags |