Guest User

Untitled

a guest
Nov 21st, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. // imports here
  2.  
  3. class ToTheGoCustom extends UpdateRequestProcessor
  4. {
  5.  
  6. //mysql params
  7. private String url = "jdbc:mysql://10.2.4.10/test";
  8. private String userName = "root";
  9. private String password = "";
  10. private int schema;
  11.  
  12.  
  13. public ToTheGoCustom( UpdateRequestProcessor next) {
  14. super( next );
  15. }
  16.  
  17. //routine di modifica
  18. @Override
  19. public void processAdd(AddUpdateCommand cmd) throws IOException {
  20. SolrInputDocument doc = cmd.getSolrInputDocument();
  21.  
  22. //salary
  23. Object sal = doc.getFieldValue( "salary" );
  24. setSalary(doc,sal);
  25.  
  26. //location
  27. Object loc = doc.getFieldValue( "location" );
  28. setLocation(doc,loc);
  29.  
  30. //jobs
  31. Object title = doc.getFieldValue( "job_title" );
  32. Object description = doc.getFieldValue( "description" );
  33. setFieldPosition(doc,title,description);
  34.  
  35.  
  36. //results
  37. super.processAdd(cmd);
  38. }
  39.  
  40. // some methods here
  41.  
  42. }
Add Comment
Please, Sign In to add comment