Query errors will appear as an exception to the search() method within the ISearchView interface. Instead of printing the full Java exception, it is possible to catch the specific exception with its error code and error message.
Example:
try {
IQueryResult result = engine.(query);
...
...
} catch (SearchEngineException e) {
System.err.println("Error " + e.getMessage() + ": " + e.getErrorCode());
}
A nonzero error code indicates query related error messages.
Tuesday, May 19, 2009
Handling Query Errors (Java Search API)
Labels:
Error,
ESP,
Esp 4.3.x,
ESP 5.2.x,
FAST,
FAST Command,
FAST Error,
FAST ESP,
Query Error