Package com.logicaldoc.core.searchengine

# Class Search

java.lang.Object
com.logicaldoc.core.searchengine.Search

Direct Known Subclasses:
  `FolderSearch`, `FulltextSearch`, `TagSearch`

public abstract class Search extends Object
This class executes a search against the full-text indexes

Author:
  Michael Scholz

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`Search.HitMapper`

## Method Summary

Modifier and Type
Method
Description
`static Search`
`get(SearchOptions opt)`
`long`
`getEstimatedHitsNumber()`
`long`
`getExecTime()`
Query execution time in milliseconds
`List<Hit>`
`getHits()`
`SearchOptions`
`getOptions()`
`boolean`
`isMoreHitsPresent()`
`static SearchOptions`
`newOptions(int type)`
`final List<Hit>`
`search()`
Perform the search
`void`
`setMoreHitsPresent(boolean moreHitsPresent)`
`void`
`setOptions(SearchOptions options)`

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

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

## Method Details

### get

public static Search get(SearchOptions opt)

### newOptions

public static SearchOptions newOptions(int type)

### search

public final List<Hit> search() throws SearchException
Perform the search

Returns:
  The list of hits
Throws:
  `SearchException` - raised in case of error during the search

### getHits

public List<Hit> getHits()

### isMoreHitsPresent

public boolean isMoreHitsPresent()

### setMoreHitsPresent

public void setMoreHitsPresent(boolean moreHitsPresent)

### getEstimatedHitsNumber

public long getEstimatedHitsNumber()

### getExecTime

public long getExecTime()
Query execution time in milliseconds

Returns:
  the execution time expressed in milliseconds

### getOptions

public SearchOptions getOptions()

### setOptions

public void setOptions(SearchOptions options)