| This is a client side search database object.
It maps to the database on server side by given server url and database name.
If the database name is not specified, server uses the predefined default database name.
Application can use this object to exchange its data with search server.
Example:
public void submitSurveyToSearch(SurveyModel survey) throws Exception {
SOIF soif = new SOIF("DOCUMENT", "survey::" + survey.getSurveyId());
soif.insert("title", survey.getSurveyName());
soif.insert("description", survey.getSurveyDescription());
soif.insert("author", survey.getSurveyOwner());
SearchDatabase db = new SearchDatabase(getSearchUrl() , getSearchDatabase());
db.insert(soif);
}
public void deleteSurveyFromSearch(String surveyId) throws Exception {
SearchDatabase db = new SearchDatabase(getSearchUrl() , getSearchDatabase());
db.delete("survey::" + surveyId);
}
|