File tree Expand file tree Collapse file tree
core/sail/fts/lucene/src/main/java/org/eclipse/rdf4j/sail/lucene Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,21 +139,36 @@ public class LuceneIndex extends AbstractLuceneIndex {
139139 public LuceneIndex () {
140140 }
141141
142+ /**
143+ * Constructor for keeping backwards compatibility.
144+ *
145+ * @param directory
146+ * @param analyzer
147+ */
148+ public LuceneIndex (Directory directory , Analyzer analyzer )
149+ throws IOException
150+ {
151+ this (directory , analyzer , new DefaultSimilarity ());
152+ }
153+
142154 /**
143155 * Creates a new LuceneIndex.
144156 *
145157 * @param directory
146158 * The Directory in which an index can be found and/or in which index files are written.
147159 * @param analyzer
148160 * The Analyzer that will be used for tokenizing strings to index and queries.
161+ * @param similarity
162+ * The Similarity that will be used for scoring.
149163 * @throws IOException
150164 * When the Directory could not be unlocked.
151165 */
152- public LuceneIndex (Directory directory , Analyzer analyzer )
166+ public LuceneIndex (Directory directory , Analyzer analyzer , Similarity similarity )
153167 throws IOException
154168 {
155169 this .directory = directory ;
156170 this .analyzer = analyzer ;
171+ this .similarity = similarity ;
157172 this .geoStrategyMapper = createSpatialStrategyMapper (Collections .<String , String > emptyMap ());
158173
159174 postInit ();
You can’t perform that action at this time.
0 commit comments