mirror of https://github.com/apache/lucene.git
SOLR-1930: remove IndexSchema deprecations
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1054039 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e855000828
commit
c918763e9b
|
@ -450,7 +450,7 @@ public class LukeRequestHandler extends RequestHandlerBase
|
||||||
if (ft.getAnalyzer().getPositionIncrementGap(f.getName()) != 0) {
|
if (ft.getAnalyzer().getPositionIncrementGap(f.getName()) != 0) {
|
||||||
field.add("positionIncrementGap", ft.getAnalyzer().getPositionIncrementGap(f.getName()));
|
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()));
|
field.add("copySources", schema.getCopySources(f.getName()));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -92,17 +92,7 @@ public final class IndexSchema {
|
||||||
*/
|
*/
|
||||||
private Map<SchemaField, Integer> copyFieldTargetCounts
|
private Map<SchemaField, Integer> copyFieldTargetCounts
|
||||||
= new HashMap<SchemaField, Integer>();
|
= 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.
|
* 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.
|
* 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 );
|
loader.inform( loader );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated -- get access to SolrConfig some other way...
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public SolrConfig getSolrConfig() {
|
|
||||||
return solrConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since solr 1.4
|
* @since solr 1.4
|
||||||
|
@ -158,31 +140,7 @@ public final class IndexSchema {
|
||||||
float getVersion() {
|
float getVersion() {
|
||||||
return version;
|
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
|
* Provides direct access to the Map containing all explicit
|
||||||
|
@ -275,9 +233,7 @@ public final class IndexSchema {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* default operator ("AND" or "OR") for QueryParser
|
* default operator ("AND" or "OR") for QueryParser
|
||||||
* @deprecated use getSolrQueryParser().getDefaultOperator()
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public String getQueryParserDefaultOperator() {
|
public String getQueryParserDefaultOperator() {
|
||||||
return queryParserDefaultOperator;
|
return queryParserDefaultOperator;
|
||||||
}
|
}
|
||||||
|
@ -1260,37 +1216,6 @@ public final class IndexSchema {
|
||||||
}
|
}
|
||||||
return sf.toArray(new SchemaField[sf.size()]);
|
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
|
* Get all copy fields for a specified source field, both static
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
isEnabled = new File(enabledFile).exists();
|
isEnabled = new File(enabledFile).exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
String collectionName = schema!=null ? schema.getName():"unknown";
|
String collectionName = schema!=null ? schema.getSchemaName():"unknown";
|
||||||
|
|
||||||
String defaultSearch = "";
|
String defaultSearch = "";
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue