Skip to content

Commit

Permalink
remove deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed Feb 9, 2025
1 parent f218bde commit 8766576
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,6 @@ private void printProcessingInfo(final String type, final int size, final Sugges
}
}

@Deprecated
public Deferred<SuggestIndexResponse>.Promise indexFromDocument(final Supplier<DocumentReader> reader, final int docPerReq,
final long requestInterval) {
return indexFromDocument(reader, docPerReq, () -> ThreadUtil.sleep(requestInterval));
}

public Deferred<SuggestIndexResponse>.Promise indexFromDocument(final Supplier<DocumentReader> reader, final int docPerReq,
final Runnable waitController) {
if (logger.isInfoEnabled()) {
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/org/codelibs/fess/suggest/SuggesterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;

import org.codelibs.core.lang.ThreadUtil;
import org.codelibs.fess.suggest.constants.FieldNames;
import org.codelibs.fess.suggest.constants.SuggestConstants;
import org.codelibs.fess.suggest.entity.ElevateWord;
Expand Down Expand Up @@ -372,7 +373,7 @@ public void test_indexFromDocumentReader() throws Exception {
ESSourceReader reader = new ESSourceReader(client, suggester.settings(), indexName);
reader.setScrollSize(1000);

suggester.indexer().indexFromDocument(() -> reader, 1000, 100).then(response -> {
suggester.indexer().indexFromDocument(() -> reader, 1000, () -> ThreadUtil.sleep(100)).then(response -> {
numObInputDoc.set(response.getNumberOfInputDocs());
latch.countDown();
}).error(t -> {
Expand Down

0 comments on commit 8766576

Please # to comment.