You are here: com.dtsearch.engine Package > Interfaces > DataSource2 Class
Close
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.

File: DataSource2.java 

Package: com.dtsearch.engine 

Syntax
Java
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.

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