You are here: com.dtsearch.engine Package > Interfaces > DataSource2 Class
dtSearch Engine API for Java
DataSource2 Class

DataSource2 provides a way for data source indexing applications to obtain information about each document that is indexed, and provides better support for indexing binary data than DataSource.


Package: com.dtsearch.engine 

public abstract class DataSource2 implements com.dtsearch.engine.DataSource;

If an IndexJob.dataSourceToIndex is based on DataSource2 instead of DataSource, then on each call to getNextDoc, the application can call getWordCount, getDocId, and getTypeId to obtain information on the previously-indexed document. 

Additionally, the data source can return binary data (such as document files) using setDocBytes() without the need to create a temporary file.

Copyright (c) 1998-2022 dtSearch Corp. All rights reserved.