mirror of https://github.com/apache/lucene.git
SOLR-679: Added accessors to spell checkers
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@683799 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7292ce8371
commit
6c39f09406
|
@ -305,6 +305,7 @@ New Features
|
|||
Also includes ability to add your own SolrSpellChecker implementation that plugs in.
|
||||
See http://wiki.apache.org/solr/SpellCheckComponent for more details
|
||||
(Shalin Shekhar Mangar, Bojan Smid, gsingers)
|
||||
53a. SOLR-679: Added accessor methods to Lucene based spell checkers (gsingers)
|
||||
|
||||
54. SOLR-423: Added Request Handler close hook notification so that RequestHandlers can be notified when a core is closing. (gsingers, ryan)
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.util.HashMap;
|
|||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
@ -347,6 +348,10 @@ public class SpellCheckComponent extends SearchComponent implements SolrCoreAwar
|
|||
}
|
||||
}
|
||||
|
||||
public Map<String, SolrSpellChecker> getSpellCheckers() {
|
||||
return Collections.unmodifiableMap(spellCheckers);
|
||||
}
|
||||
|
||||
// ///////////////////////////////////////////
|
||||
// / SolrInfoMBean
|
||||
// //////////////////////////////////////////
|
||||
|
|
|
@ -168,4 +168,42 @@ public abstract class AbstractLuceneSpellChecker extends SolrSpellChecker {
|
|||
index = new RAMDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @return the Accuracy used for the Spellchecker
|
||||
* */
|
||||
public float getAccuracy() {
|
||||
return accuracy;
|
||||
}
|
||||
|
||||
/*
|
||||
* @return the Field used
|
||||
*
|
||||
* */
|
||||
public String getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* @return the FieldType name.
|
||||
* */
|
||||
public String getFieldTypeName() {
|
||||
return fieldTypeName;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @return the Index directory
|
||||
* */
|
||||
public String getIndexDir() {
|
||||
return indexDir;
|
||||
}
|
||||
|
||||
/*
|
||||
* @return the location of the source
|
||||
* */
|
||||
public String getSourceLocation() {
|
||||
return sourceLocation;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,5 +129,8 @@ public class FileBasedSpellChecker extends AbstractLuceneSpellChecker {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String getCharacterEncoding() {
|
||||
return characterEncoding;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,4 +108,9 @@ public class IndexBasedSpellChecker extends AbstractLuceneSpellChecker {
|
|||
//reload the source
|
||||
initSourceReader();
|
||||
}
|
||||
|
||||
|
||||
public float getThreshold() {
|
||||
return threshold;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue