mirror of https://github.com/apache/lucene.git
SOLR-6594 Mark old schema APIs as deprecated
This commit is contained in:
parent
b47eeb2bb3
commit
2184a7baf6
|
@ -319,6 +319,8 @@ Upgrading from Solr 5.4
|
|||
* Clearing up stored async collection api responses via REQUESTSTATUS call is now deprecated and would be
|
||||
removed in 6.0. See SOLR-8648 for more details.
|
||||
|
||||
* SOLR-6594: Deprecated the old schema API which will be removed in a later major release
|
||||
|
||||
Detailed Change List
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -175,12 +175,18 @@ public abstract class BaseSolrResource extends ServerResource {
|
|||
|
||||
// TODO: should status=0 (success?) be left as-is in the response header?
|
||||
SolrCore.postDecorateResponse(null, solrRequest, solrResponse);
|
||||
addDeprecatedWarning();
|
||||
|
||||
if (log.isInfoEnabled() && solrResponse.getToLog().size() > 0) {
|
||||
log.info(solrResponse.getToLogAsString(solrCore.getLogId()));
|
||||
}
|
||||
}
|
||||
|
||||
protected void addDeprecatedWarning(){
|
||||
solrResponse.add("warn","This API is deprecated");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* If there is an exception on the SolrResponse:
|
||||
* <ul>
|
||||
|
|
|
@ -431,7 +431,12 @@ public class RestManager {
|
|||
throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, errMsg, ioExc);
|
||||
}
|
||||
return parsedJson;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addDeprecatedWarning() {
|
||||
//this is not deprecated
|
||||
}
|
||||
} // end ManagedEndpoint class
|
||||
|
||||
/**
|
||||
|
@ -788,5 +793,5 @@ public class RestManager {
|
|||
if (ManagedResource.ChildResourceSupport.class.isAssignableFrom(res.getClass())) {
|
||||
router.attach(path+"/{child}", res.getServerResourceClass());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue