File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
java/org/apache/lucene/util/fst
test/org/apache/lucene/util/fst Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -249,23 +249,25 @@ public Builder<T> allowFixedLengthArcs(boolean allowFixedLengthArcs) {
249249 *
250250 * <p>Default = 15.
251251 *
252- * @deprecated use {@link #fstWriter(FSTWriter )} instead
252+ * @deprecated use {@link #dataOutput(DataOutput )} instead
253253 */
254254 @ Deprecated
255255 public Builder <T > bytesPageBits (int bytesPageBits ) {
256- return fstWriter (new BytesStore (bytesPageBits ));
256+ this .fstWriter = new BytesStore (bytesPageBits );
257+ return this ;
257258 }
258259
259260 /**
260- * Set the {@link FSTWriter } which is used for low-level writing of FST.
261+ * Set the {@link DataOutput } which is used for low-level writing of FST.
261262 *
262- * <p>Note: Setting this will override the settings in {@link #bytesPageBits(int)}
263+ * <p>Note: Setting this will override the settings in {@link #bytesPageBits(int)} as it will
264+ * use {@link DataOutputFSTWriter}
263265 *
264- * @param fstWriter the FSTWriter
266+ * @param dataOutput the DataOutput
265267 * @return this builder
266268 */
267- public Builder <T > fstWriter ( FSTWriter fstWriter ) {
268- this .fstWriter = fstWriter ;
269+ public Builder <T > dataOutput ( DataOutput dataOutput ) {
270+ this .fstWriter = new DataOutputFSTWriter ( dataOutput ) ;
269271 return this ;
270272 }
271273
Original file line number Diff line number Diff line change @@ -204,8 +204,7 @@ protected FSTCompiler.Builder<T> getFSTBuilder() {
204204 // as the byte array could already contain another FST bytes, we should get the current offset
205205 // to know where to start reading from
206206 this .previousOffset = baos .size ();
207- return super .getFSTBuilder ()
208- .fstWriter (new DataOutputFSTWriter (new OutputStreamDataOutput (baos )));
207+ return super .getFSTBuilder ().dataOutput (new OutputStreamDataOutput (baos ));
209208 }
210209
211210 @ Override
You can’t perform that action at this time.
0 commit comments