Skip to content

Apache Lucene open-source search software

SOLR-1930: remove IndexSchema deprecations

Yonik Seeleyc918763e9b85
diff --git a/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java b/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
index 0ccd0ae757a..76c28f85720 100644
--- a/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
+++ b/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
@@ -450,7 +450,7 @@ public class LukeRequestHandler extends RequestHandlerBase
if (ft.getAnalyzer().getPositionIncrementGap(f.getName()) != 0) {
field.add("positionIncrementGap", ft.getAnalyzer().getPositionIncrementGap(f.getName()));
}
- field.add("copyDests", schema.getCopyFields(f.getName()));
+ field.add("copyDests", schema.getCopyFieldsList(f.getName()));
field.add("copySources", schema.getCopySources(f.getName()));
diff --git a/solr/src/java/org/apache/solr/schema/IndexSchema.java b/solr/src/java/org/apache/solr/schema/IndexSchema.java
index 30b93d1e1f1..42528160e95 100644
--- a/solr/src/java/org/apache/solr/schema/IndexSchema.java
+++ b/solr/src/java/org/apache/solr/schema/IndexSchema.java
@@ -92,17 +92,7 @@ public final class IndexSchema {
*/
private Map<SchemaField, Integer> copyFieldTargetCounts
= new HashMap<SchemaField, Integer>();
- /**
- * Constructs a schema using the specified file name using the normal
- * Config path directory searching rules.
- *
- * @see Config#openResource
- * @deprecated Use {@link #IndexSchema(SolrConfig, String, InputStream)} instead.
- */
- @Deprecated
- public IndexSchema(SolrConfig solrConfig, String name) {
- this(solrConfig, name, null);
- }
+
/**
* Constructs a schema using the specified resource name and stream.
* If the is stream is null, the resource loader will load the schema resource by name.
@@ -128,14 +118,6 @@ public final class IndexSchema {
}
loader.inform( loader );
}
-
- /**
- * @deprecated -- get access to SolrConfig some other way...
- */
- @Deprecated
- public SolrConfig getSolrConfig() {
- return solrConfig;
- }
/**
* @since solr 1.4
@@ -158,31 +140,7 @@ public final class IndexSchema {
float getVersion() {
return version;
}
-
- /**
- * Direct access to the InputStream for the schemaFile used by this instance.
- * @see Config#openResource
- * @deprecated Use {@link #getSolrConfig()} and open a resource input stream
- * for {@link #getResourceName()} instead.
- */
- @Deprecated
- public InputStream getInputStream() {
- return loader.openResource(resourceName);
- }
-
- /** Gets the name of the schema file.
- * @deprecated Use {@link #getResourceName()} instead.
- */
- @Deprecated
- public String getSchemaFile() {
- return resourceName;
- }
- /** The Name of this schema (as specified in the schema file)
- * @deprecated Use {@link #getSchemaName()} instead.
- */
- @Deprecated
- public String getName() { return name; }
/**
* Provides direct access to the Map containing all explicit
@@ -275,9 +233,7 @@ public final class IndexSchema {
/**
* default operator ("AND" or "OR") for QueryParser
- * @deprecated use getSolrQueryParser().getDefaultOperator()
*/
- @Deprecated
public String getQueryParserDefaultOperator() {
return queryParserDefaultOperator;
}
@@ -1260,37 +1216,6 @@ public final class IndexSchema {
}
return sf.toArray(new SchemaField[sf.size()]);
}
- /**
- * Get all copy fields, both the static and the dynamic ones.
- *
- * @param sourceField
- * @return Array of fields to copy to.
- * @deprecated Use {@link #getCopyFieldsList(String)} instead.
- */
- @Deprecated
- public SchemaField[] getCopyFields(String sourceField) {
- // This is the List that holds all the results, dynamic or not.
- List<SchemaField> matchCopyFields = new ArrayList<SchemaField>();
-
- // Get the dynamic results into the list.
- for(DynamicCopy dynamicCopy : dynamicCopyFields) {
- if(dynamicCopy.matches(sourceField)) {
- matchCopyFields.add(dynamicCopy.getTargetField(sourceField));
- }
- }
-
- // Get the fixed ones, if there are any and add them.
- final List<CopyField> copyFields = copyFieldsMap.get(sourceField);
- if (copyFields!=null) {
- final Iterator<CopyField> it = copyFields.iterator();
- while (it.hasNext()) {
- matchCopyFields.add(it.next().getDestination());
- }
- }
-
- // Construct the results by transforming the list into an array.
- return matchCopyFields.toArray(new SchemaField[matchCopyFields.size()]);
- }
/**
* Get all copy fields for a specified source field, both static
diff --git a/solr/src/webapp/web/admin/_info.jsp b/solr/src/webapp/web/admin/_info.jsp
index 260e160a2aa..90fc2d4628a 100644
--- a/solr/src/webapp/web/admin/_info.jsp
+++ b/solr/src/webapp/web/admin/_info.jsp
@@ -63,7 +63,7 @@
isEnabled = new File(enabledFile).exists();
}
- String collectionName = schema!=null ? schema.getName():"unknown";
+ String collectionName = schema!=null ? schema.getSchemaName():"unknown";
String defaultSearch = "";
{