public Map<String, Map<String, String>> toMap(SolrDocument document, String uniqueKey) { Map<String, Map<String, String>> map = new HashMap<>(); Map<String, String> retrievedFields = new HashMap<>(); String uniqueKeyValue = null; for (Map.Entry<String, Object> entry: document.entrySet()) { String name = entry.getKey(); String value = entry.getValue().toString(); if (isSolrDocumentFieldIgnored(name)) { continue; } if (name.equals(uniqueKey)) { uniqueKeyValue = value; continue; } retrievedFields.put(name, value); } if (uniqueKeyValue != null) { map.put(uniqueKeyValue, retrievedFields); } return map; }
skipFieldsEquals.forEach(f -> d.removeFields(f.getText())); if (skipFieldsStartWith.size() > 0 || skipFieldsEndWith.size() > 0) { Map<String, Object> collect = d.entrySet() .stream() .filter(e -> !skipFieldsStartWith.stream()
docCounter++; System.out.println( "Doc # " + docCounter ); for ( Entry<String, Object> field : doc.entrySet() ) { String name = field.getKey(); Object value = field.getValue(); for ( SolrDocument child : childDocs ) { System.out.println( "\tChild doc:" ); for ( Entry<String, Object> field : child.entrySet() ) { String name = field.getKey(); Object value = field.getValue();
for (SolrDocument document : response.getResults()) { writeStart("tr"); for (Map.Entry<String, Object> entry : document.entrySet()) { writeStart("td"); writeObject(entry.getValue());