Package org.terrier.applications
Class ThreadedBatchIndexing
- java.lang.Object
-
- org.terrier.applications.BatchIndexing
-
- org.terrier.applications.ThreadedBatchIndexing
-
public class ThreadedBatchIndexing extends BatchIndexing
An implementation of BatchIndexing that uses Java 8 parallel streams to increase indexing speed on multi-core machines.- Since:
- 4.2
- Author:
- Craig Macdonald
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.terrier.applications.BatchIndexing
BatchIndexing.Command
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerloggerThe logger used-
Fields inherited from class org.terrier.applications.BatchIndexing
blocks, collectionClassName, collectionFiles, collectionSpec, externalParalllism, path, prefix
-
-
Constructor Summary
Constructors Constructor Description ThreadedBatchIndexing(java.lang.String _path, java.lang.String _prefix, boolean _singlePass)ThreadedBatchIndexing(java.lang.String _path, java.lang.String _prefix, boolean _singlePass, int threads)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidindex()voidsetMaxThreads(int threads)Define maximum number of threads in use.-
Methods inherited from class org.terrier.applications.BatchIndexing
getExternalParalllism, loadCollection, loadCollection, setCollectionName, setCollectionSpec, setExternalParalllism
-
-
-
-
Method Detail
-
setMaxThreads
public void setMaxThreads(int threads)
Define maximum number of threads in use. -1 for no limit.
-
index
public void index()
- Specified by:
indexin classBatchIndexing
-
-