Exemplo n.º 1
0
 private SolrInputDocument createIndexDocument(Person resource) {
   Map<String, Object> additionalIndexedProperties = new HashMap<String, Object>();
   additionalIndexedProperties.put("description", resource.getDescription());
   additionalIndexedProperties.put("gender", resource.getGender());
   additionalIndexedProperties.put("language", resource.getLanguage());
   additionalIndexedProperties.put("nationality", resource.getNationality());
   additionalIndexedProperties.put("emailaddresses", resource.getEmailAddresses());
   ResourceToSolrTranslator translator = new ResourceToSolrTranslator();
   translator.add(resource, additionalIndexedProperties);
   return translator.getInputDocument();
 }
Exemplo n.º 2
0
 protected String toString(final Speaker speaker) {
   Person person = Entities.getInstance().getContact(speaker.getPersonId());
   return person == null ? speaker.getPersonId() + "???" : person.getName();
 }