mirror of https://github.com/apache/lucene.git
SOLR-215 -- adding CHANGES.txt and moving the deprecation warning from BaseXXXFactory to IndexSchema.java
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@584319 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f1c3211c3d
commit
1f78c1be76
10
CHANGES.txt
10
CHANGES.txt
|
@ -197,6 +197,16 @@ Other Changes
|
|||
|
||||
3. Upgraded to Lucene 2.2.0; June 18, 2007.
|
||||
|
||||
4. SOLR-215: In an push to support multiple SolrCores, the TokenizerFactory
|
||||
and TokenFilterFactory initalization interface has changed to accept the
|
||||
solrConfig. Initialization should happen in:
|
||||
init(SolrConfig solrConfig, Map<String,String> args)
|
||||
rather then:
|
||||
init(Map<String,String> args)
|
||||
Existing classes should continue to work, but it is encouraged to update
|
||||
the initialization code.
|
||||
|
||||
|
||||
================== Release 1.2, 20070602 ==================
|
||||
|
||||
Upgrading from Solr 1.1
|
||||
|
|
|
@ -35,7 +35,6 @@ public abstract class BaseTokenizerFactory implements TokenizerFactory, SolrConf
|
|||
|
||||
@Deprecated
|
||||
public void init(Map<String,String> args) {
|
||||
//log.warning("calling the deprecated form of init; should be calling init(SolrConfig solrConfig, Map<String,String> args)");
|
||||
this.args=args;
|
||||
}
|
||||
|
||||
|
|
|
@ -629,10 +629,13 @@ public final class IndexSchema {
|
|||
NamedNodeMap attrs = node.getAttributes();
|
||||
String className = DOMUtil.getAttr(attrs,"class","tokenizer");
|
||||
TokenizerFactory tfac = (TokenizerFactory)solrConfig.newInstance(className);
|
||||
if (tfac instanceof SolrConfig.Initializable)
|
||||
if (tfac instanceof SolrConfig.Initializable) {
|
||||
((SolrConfig.Initializable)tfac).init(solrConfig, DOMUtil.toMapExcept(attrs,"class"));
|
||||
else
|
||||
}
|
||||
else {
|
||||
log.warning("calling the deprecated form of init; should be calling init(SolrConfig solrConfig, Map<String,String> args) " + className );
|
||||
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
||||
}
|
||||
|
||||
return tfac;
|
||||
}
|
||||
|
@ -643,11 +646,13 @@ public final class IndexSchema {
|
|||
NamedNodeMap attrs = node.getAttributes();
|
||||
String className = DOMUtil.getAttr(attrs,"class","token filter");
|
||||
TokenFilterFactory tfac = (TokenFilterFactory)solrConfig.newInstance(className);
|
||||
if (tfac instanceof SolrConfig.Initializable)
|
||||
if (tfac instanceof SolrConfig.Initializable) {
|
||||
((SolrConfig.Initializable)tfac).init(solrConfig, DOMUtil.toMapExcept(attrs,"class"));
|
||||
else
|
||||
}
|
||||
else {
|
||||
log.warning("calling the deprecated form of init; should be calling init(SolrConfig solrConfig, Map<String,String> args) " + className );
|
||||
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
||||
|
||||
}
|
||||
return tfac;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue