asu-ke-web-services / search-api

Search API for documents, data, research, people, etc
MIT License
2 stars 1 forks source link

SearchEngine should return error message if unrecoverable error state occurs. #95

Open kenprice opened 8 years ago

kenprice commented 8 years ago

Suppose a user attempts a search, and somehow our Search API goes into an unrecoverable error state and fails to return results. This should be indicated as part of search results so that the error can be displayed to the user.

Example additions to SearchResult class:

class SearchResult {
  public $results;
  public $count = 0;
  public $original_request;
  public $error_message = NULL;
  public $warning_message = NULL;
}