Skip to content

Commit

Permalink
show solr errors (if any) on debug page #3632
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed May 7, 2014
1 parent e08d10f commit c447bf2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/SearchIncludeFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public class SearchIncludeFragment {
// private boolean showUnpublished;
List<String> filterQueriesDebug = new ArrayList<>();
// private Map<String, String> friendlyName = new HashMap<>();
private String errorFromSolr;

/**
* @todo:
Expand Down Expand Up @@ -288,6 +289,7 @@ public void search(boolean onlyDataRelatedToMe) {
this.datasetfieldFriendlyNamesBySolrField = solrQueryResponse.getDatasetfieldFriendlyNamesBySolrField();
this.staticSolrFieldFriendlyNamesBySolrField = solrQueryResponse.getStaticSolrFieldFriendlyNamesBySolrField();
this.filterQueriesDebug = solrQueryResponse.getFilterQueriesActual();
this.errorFromSolr = solrQueryResponse.getError();
paginationGuiStart = paginationStart + 1;
paginationGuiEnd = Math.min(page * paginationGuiRows,searchResultsCount);
List<SolrSearchResult> searchResults = solrQueryResponse.getSolrSearchResults();
Expand Down Expand Up @@ -904,4 +906,13 @@ public String getNewSelectedTypes(String typeClicked) {
return combine(arr, ":");

}

public String getErrorFromSolr() {
return errorFromSolr;
}

public void setErrorFromSolr(String errorFromSolr) {
this.errorFromSolr = errorFromSolr;
}

}
1 change: 1 addition & 0 deletions src/main/webapp/search-include-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
<h:outputText value="mode:#{SearchIncludeFragment.mode} "/>
<h:outputText value="sort=#{SearchIncludeFragment.sortField}:#{SearchIncludeFragment.sortOrder}"/><br/>
<h:outputText value="#{SearchIncludeFragment.filterQueriesDebug}"/><br/>
<h:outputText value="errorFromSolr: #{SearchIncludeFragment.errorFromSolr}" rendered="#{SearchIncludeFragment.errorFromSolr != null}"/>
</tt>
</div>
</ui:fragment>
Expand Down

0 comments on commit c447bf2

Please sign in to comment.