@Test public void updateQueryWithExcludedObjects_includeIfSpecificallyRequested() throws Exception { String query = "ann.*"; String updatedQuery = unit.updateQueryWithExcludedObjects(query, URLEncoder.encode("{!field f=object_type_facet}BAND", SearchConstants.FACETED_SEARCH_ENCODING)); assertEquals("ann.* AND -object_type_s:AUTHOR", updatedQuery); query = "ann.*"; updatedQuery = unit.updateQueryWithExcludedObjects(query, URLEncoder.encode("{!field f=object_type_s}BAND", SearchConstants.FACETED_SEARCH_ENCODING)); assertEquals("ann.* AND -object_type_s:AUTHOR", updatedQuery); }
public String updateQueryWithExcludedObjects(String query, String rowQueryParameters) { if (query != null) { String[] objectsToExcludeArray = getObjectsToExclude(); String subQuery = getObjectsToExcludeSubQuery(objectsToExcludeArray, rowQueryParameters); if (!"".equals(subQuery)) { query += " " + SearchConstants.OPERATOR_AND + " " + subQuery; } } return query; }
FacetedSearchService { public String updateQueryWithExcludedObjects(String query, String rowQueryParameters) { if (query != null) { String[] objectsToExcludeArray = getObjectsToExclude(); String subQuery = getObjectsToExcludeSubQuery(objectsToExcludeArray, rowQueryParameters); if (!"".equals(subQuery)) { query += " " + SearchConstants.OPERATOR_AND + " " + subQuery; } } return query; } }
FacetedSearchService { public String updateQueryWithExcludedObjects(String query, String rowQueryParameters) { if (query != null) { String[] objectsToExcludeArray = getObjectsToExclude(); String subQuery = getObjectsToExcludeSubQuery(objectsToExcludeArray, rowQueryParameters); if (!"".equals(subQuery)) { query += " " + SearchConstants.OPERATOR_AND + " " + subQuery; } } return query; }  }
FacetedSearchService { public String updateQueryWithExcludedObjects(String query, String rowQueryParameters) { if (query != null) { String[] objectsToExcludeArray = getObjectsToExclude(); String subQuery = getObjectsToExcludeSubQuery(objectsToExcludeArray, rowQueryParameters); if (!"".equals(subQuery)) { query += " " + SearchConstants.OPERATOR_AND + " " + subQuery; } } return query; }  String buildHiddenDocumentsFilter(); String getFacetKeys(); String buildSolrQuery(String filter); String updateQueryWithExcludedObjects(String query, String rowQueryParameters); String replaceEventTypeName(String solrResult); String escapeQueryChars(String s); String escapeTermsInQuery(String query); SearchConfig getSearchConfig(); void setSearchConfig(SearchConfig searchConfig); AuditEventConfig getAuditEventConfig(); void setAuditEventConfig(AuditEventConfig auditEventConfig); JSONObject getParentDocumentJsonObject(Authentication authentication, String res); ExecuteSolrQuery getExecuteSolrQuery(); void setExecuteSolrQuery(ExecuteSolrQuery executeSolrQuery); }
FacetedSearchService { public String updateQueryWithExcludedObjects(String query, String rowQueryParameters) { if (query != null) { String[] objectsToExcludeArray = getObjectsToExclude(); String subQuery = getObjectsToExcludeSubQuery(objectsToExcludeArray, rowQueryParameters); if (!"".equals(subQuery)) { query += " " + SearchConstants.OPERATOR_AND + " " + subQuery; } } return query; }  String buildHiddenDocumentsFilter(); String getFacetKeys(); String buildSolrQuery(String filter); String updateQueryWithExcludedObjects(String query, String rowQueryParameters); String replaceEventTypeName(String solrResult); String escapeQueryChars(String s); String escapeTermsInQuery(String query); SearchConfig getSearchConfig(); void setSearchConfig(SearchConfig searchConfig); AuditEventConfig getAuditEventConfig(); void setAuditEventConfig(AuditEventConfig auditEventConfig); JSONObject getParentDocumentJsonObject(Authentication authentication, String res); ExecuteSolrQuery getExecuteSolrQuery(); void setExecuteSolrQuery(ExecuteSolrQuery executeSolrQuery);  }