/** * @return a list of field names defined in this document - this Collection is directly backed by this SolrDocument. * @see #keySet */ @Override public Collection<String> getFieldNames() { return this.keySet(); }
/** * @return a list of field names defined in this document - this Collection is directly backed by this SolrDocument. * @see #keySet */ public Collection<String> getFieldNames() { return this.keySet(); }
@Override public Set<String> getPropertyNames() { return SolrIndex.getPropertyFields(doc.keySet()); }
@Override public Set<String> getPropertyNames() { return SolrIndex.getPropertyFields(doc.keySet()); }
public Tuple read() throws IOException { if(documentIterator.hasNext()) { Map map = new HashMap(); SolrDocument doc = documentIterator.next(); for(String key : doc.keySet()) { map.put(key, doc.get(key)); } return new Tuple(map); } else { Map fields = new HashMap(); fields.put("EOF", true); Tuple tuple = new Tuple(fields); return tuple; } }
public Tuple read() throws IOException { if(documentIterator.hasNext()) { Map map = new HashMap(); SolrDocument doc = documentIterator.next(); for(String key : doc.keySet()) { map.put(key, doc.get(key)); } return new Tuple(map); } else { Map fields = new HashMap(); fields.put("EOF", true); Tuple tuple = new Tuple(fields); return tuple; } }
private Record toRecord(SolrDocument doc) { Record record = new Record(); for (String key : doc.keySet()) { record.getFields().replaceValues(key, doc.getFieldValues(key)); } return record; }