public class InMemoryIndex extends Object implements Index
The functionality in here is not meant to provide a real search - just act as a placeholder for unit tests, or while deciding on an implementation
| Constructor and Description |
|---|
InMemoryIndex() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginBatch()
Lets the index know that submissions are coming.
|
void |
clearIndex() |
void |
endBatch()
Lets the index know it may close any writers ( if applicable ), and may perform optimisations and bring the index back online
|
IndexMetrics |
fetchMetrics() |
SearchResult |
search(SearchQuery query) |
SearchResult |
search(String s,
int max) |
void |
submitBatchEntry(IndexEntry entry)
Submit an item to the index, within begin and end update
|
void |
submitSingleEntry(IndexEntry entry)
Submit a single new item the index - outside batchUpdates
|
public void clearIndex()
clearIndex in interface Indexpublic void submitSingleEntry(IndexEntry entry)
IndexsubmitSingleEntry in interface Indexpublic void submitBatchEntry(IndexEntry entry)
IndexsubmitBatchEntry in interface Indexpublic IndexMetrics fetchMetrics()
fetchMetrics in interface Indexpublic void beginBatch()
IndexbeginBatch in interface Indexpublic void endBatch()
Indexpublic SearchResult search(String s, int max)
public SearchResult search(SearchQuery query)
Copyright © 2017. All rights reserved.