SOLR-14510: Remove deprecations added with BlockMax WAND support (#1823)

This commit is contained in:
Tomas Fernandez Lobbe 2020-09-10 10:33:09 -07:00 committed by GitHub
parent 14e4edc1e9
commit 0250978869
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 6 additions and 96 deletions

View File

@ -294,13 +294,6 @@ class GeoJSONWriter extends JSONWriter {
} }
} }
@Deprecated
@Override
public void writeStartDocumentList(String name,
long start, int size, long numFound, Float maxScore) throws IOException {
throw new UnsupportedOperationException();
}
@Override @Override
public void writeStartDocumentList(String name, public void writeStartDocumentList(String name,
long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException

View File

@ -215,13 +215,6 @@ class ArrayOfNameTypeValueJSONWriter extends JSONWriter {
super.writeSolrDocument(name, doc, returnFields, idx); super.writeSolrDocument(name, doc, returnFields, idx);
} }
@Deprecated
@Override
public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore) throws IOException {
ifNeededWriteTypeAndValueKey("doclist");
super.writeStartDocumentList(name, start, size, numFound, maxScore);
}
@Override @Override
public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException { public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException {
ifNeededWriteTypeAndValueKey("doclist"); ifNeededWriteTypeAndValueKey("doclist");

View File

@ -132,36 +132,6 @@ public class JSONWriter extends TextResponseWriter implements JsonTextWriter {
// that the size could not be reliably determined. // that the size could not be reliably determined.
// //
/**
* This method will be removed in Solr 9
* @deprecated Use {{@link #writeStartDocumentList(String, long, int, long, Float, Boolean)}.
*/
@Override
@Deprecated
public void writeStartDocumentList(String name,
long start, int size, long numFound, Float maxScore) throws IOException
{
writeMapOpener(headerSize(maxScore, null));
incLevel();
writeKey("numFound",false);
writeLong(null,numFound);
writeMapSeparator();
writeKey("start",false);
writeLong(null,start);
if (maxScore!=null) {
writeMapSeparator();
writeKey("maxScore",false);
writeFloat(null,maxScore);
}
writeMapSeparator();
// indent();
writeKey("docs",false);
writeArrayOpener(size);
incLevel();
}
@Override @Override
public void writeStartDocumentList(String name, public void writeStartDocumentList(String name,
long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException { long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException {

View File

@ -86,15 +86,7 @@ class PHPSerializedWriter extends JSONWriter {
@Override @Override
public void writeNamedList(String name, @SuppressWarnings({"rawtypes"})NamedList val) throws IOException { public void writeNamedList(String name, @SuppressWarnings({"rawtypes"})NamedList val) throws IOException {
writeNamedListAsMapMangled(name,val); writeNamedListAsMapMangled(name, val);
}
@Deprecated
@Override
public void writeStartDocumentList(String name,
long start, int size, long numFound, Float maxScore) throws IOException
{
throw new UnsupportedOperationException();
} }
@Override @Override

View File

@ -466,11 +466,6 @@ public class SchemaXmlWriter extends TextResponseWriter {
writer.write('>'); writer.write('>');
} }
@Override
public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore) throws IOException {
// no-op
}
@Override @Override
public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException { public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException {
// no-op // no-op

View File

@ -121,13 +121,6 @@ public abstract class TabularResponseWriter extends TextResponseWriter {
public void writeNamedList(String name, @SuppressWarnings({"rawtypes"})NamedList val) throws IOException { public void writeNamedList(String name, @SuppressWarnings({"rawtypes"})NamedList val) throws IOException {
} }
@Override
public void writeStartDocumentList(String name,
long start, int size, long numFound, Float maxScore) throws IOException
{
// nothing
}
@Override @Override
public void writeStartDocumentList(String name, public void writeStartDocumentList(String name,
long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException

View File

@ -157,16 +157,7 @@ public abstract class TextResponseWriter implements TextWriter {
// types of formats, including those where the name may come after the value (like // types of formats, including those where the name may come after the value (like
// some XML formats). // some XML formats).
//TODO: Make abstract in Solr 9.0 public abstract void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException;
public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException {
writeStartDocumentList(name, start, size, numFound, maxScore);
}
/**
* @deprecated Use {@link #writeStartDocumentList(String, long, int, long, Float, Boolean)}
*/
@Deprecated
public abstract void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore) throws IOException;
public abstract void writeSolrDocument(String name, SolrDocument doc, ReturnFields fields, int idx) throws IOException; public abstract void writeSolrDocument(String name, SolrDocument doc, ReturnFields fields, int idx) throws IOException;

View File

@ -188,26 +188,6 @@ public class XMLWriter extends TextResponseWriter {
incLevel(); incLevel();
} }
@Override
@Deprecated
public void writeStartDocumentList(String name,
long start, int size, long numFound, Float maxScore) throws IOException
{
if (doIndent) indent();
writer.write("<result");
writeAttr(NAME, name);
writeAttr("numFound",Long.toString(numFound));
writeAttr("start",Long.toString(start));
if(maxScore!=null) {
writeAttr("maxScore",Float.toString(maxScore));
}
writer.write(">");
incLevel();
}
/** /**
* The SolrDocument should already have multivalued fields implemented as * The SolrDocument should already have multivalued fields implemented as
* Collections -- this will not rewrite to &lt;arr&gt; * Collections -- this will not rewrite to &lt;arr&gt;

View File

@ -125,6 +125,9 @@ _(raw; not yet edited)_
* SOLR-14783: Data Import Handler (DIH) has been removed from Solr. The community package is available at: https://github.com/rohitbemax/dataimporthandler (Alexandre Rafalovitch) * SOLR-14783: Data Import Handler (DIH) has been removed from Solr. The community package is available at: https://github.com/rohitbemax/dataimporthandler (Alexandre Rafalovitch)
* SOLR-14510: The `writeStartDocumentList` in `TextResponseWriter` now receives an extra boolean parameter representing the "exactness" of the numFound value (exact vs approximation).
Any custom response writer extending `TextResponseWriter` will need to implement this abstract method now (instead previous with the same name but without the new boolean parameter).
=== Upgrade Prerequisites in Solr 9 === Upgrade Prerequisites in Solr 9
* Upgrade all collections in stateFormat=1 to stateFormat=2 *before* upgrading to Solr 9, as Solr 9 does not support the * Upgrade all collections in stateFormat=1 to stateFormat=2 *before* upgrading to Solr 9, as Solr 9 does not support the