예제 #1
0
 /** Get an alphabetically sorted list of field names. */
 public List<String> getFieldNames() {
   HashSet<String> names = new HashSet<String>();
   names.addAll(storedFields.keySet());
   names.addAll(reconstructedFields.keySet());
   ArrayList<String> res = new ArrayList<String>(names.size());
   res.addAll(names);
   Collections.sort(res);
   return res;
 }
  /**
   * Search pictures that appear in all features
   *
   * @param source
   * @param maxHist
   * @param featureEnumerates
   * @return
   * @throws IOException
   */
  public static List<LirePictureSortable> searchAllFeatures(
      byte[] source, int maxHist, List<FeatureEnumerate> featureEnumerates) throws IOException {

    /* extract pictures sortable info from Lucene indexes */
    /* only from extract features from picture search */
    List<LirePictureSortable> result = new ArrayList<>();
    for (FeatureEnumerate feature : featureEnumerates) {
      result.addAll(LireBuilder.search(source, maxHist, feature, result));
    }

    /* save UUID from pictures ordered by score */
    Collections.sort(result);

    return result;
  }