Package com.logicaldoc.core.searchengine.indexer

# Class IndexerTask

java.lang.Object
com.logicaldoc.core.task.Task
com.logicaldoc.core.task.AbstractDocumentProcessor
com.logicaldoc.core.searchengine.indexer.IndexerTask

All Implemented Interfaces:
  `Runnable`

@Component("indexerTask") public class IndexerTask extends AbstractDocumentProcessor
This task enlists all non-indexed documents and performs the indexing

Since:
  4.0
Author:
  Marco Meschieri - LogicalDOC

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`NAME`

### Fields inherited from class com.logicaldoc.core.task.Task

`STATUS_IDLE, STATUS_RUNNING, STATUS_STOPPING`

## Constructor Summary

Constructors
Constructor
Description
`IndexerTask()`

## Method Summary

Modifier and Type
Method
Description
`void`
`interrupt()`
`boolean`
`isConcurrent()`
Concrete implementations must override this method declaring if the task supports multiple instances running concurrently.
`boolean`
`isIndeterminate()`
Concrete implementations must override this method declaring if the task is indeterminate.
`static String[]`
`prepareQuery()`
Prepares the query to search the documents to be indexed
`String`
`prepareReport(Locale locale)`
`void`
`runTask()`

### Methods inherited from class com.logicaldoc.core.task.Task

`addTaskListener, getCompletionPercentage, getConfig, getName, getProgress, getReportRecipients, getScheduling, getSize, getStatus, isInterrupted, isInterruptRequested, isRunning, isSendActivityReport, notifyReport, removeTaskListener, run, save, saveWork, setReportRecipients, setSendActivityReport, setSize`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### NAME

public static final String NAME

See Also:
  - Constant Field Values

## Constructor Details

### IndexerTask

public IndexerTask()

## Method Details

### isIndeterminate

public boolean isIndeterminate()
Description copied from class: `Task`
Concrete implementations must override this method declaring if the task is indeterminate. An indeterminate task is not able to compute it's time length

Overrides:
  `isIndeterminate` in class `AbstractDocumentProcessor`
Returns:
  true if the task is indeterminate

### isConcurrent

public boolean isConcurrent()
Description copied from class: `Task`
Concrete implementations must override this method declaring if the task supports multiple instances running concurrently. tHIbernat

Overrides:
  `isConcurrent` in class `AbstractDocumentProcessor`
Returns:
  true if the task is concurrent

### interrupt

public void interrupt()

Overrides:
  `interrupt` in class `AbstractDocumentProcessor`

### runTask

public void runTask() throws TaskException

Overrides:
  `runTask` in class `AbstractDocumentProcessor`
Throws:
  `TaskException`

### prepareQuery

public static String[] prepareQuery()
Prepares the query to search the documents to be indexed

Returns:
  array composed by the query to execute and the sorting expression

### prepareReport

public String prepareReport(Locale locale)

Overrides:
  `prepareReport` in class `AbstractDocumentProcessor`