Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // imports here
- class ToTheGoCustom extends UpdateRequestProcessor
- {
- //mysql params
- private String url = "jdbc:mysql://10.2.4.10/test";
- private String userName = "root";
- private String password = "";
- private int schema;
- public ToTheGoCustom( UpdateRequestProcessor next) {
- super( next );
- }
- //routine di modifica
- @Override
- public void processAdd(AddUpdateCommand cmd) throws IOException {
- SolrInputDocument doc = cmd.getSolrInputDocument();
- //salary
- Object sal = doc.getFieldValue( "salary" );
- setSalary(doc,sal);
- //location
- Object loc = doc.getFieldValue( "location" );
- setLocation(doc,loc);
- //jobs
- Object title = doc.getFieldValue( "job_title" );
- Object description = doc.getFieldValue( "description" );
- setFieldPosition(doc,title,description);
- //results
- super.processAdd(cmd);
- }
- // some methods here
- }
Add Comment
Please, Sign In to add comment