public final class GenericFleaDB extends Object implements FleaDB<org.brutusin.json.spi.JsonNode>
| Modifier and Type | Field and Description |
|---|---|
static org.apache.lucene.util.Version |
LUCENE_VERSION |
| Constructor and Description |
|---|
GenericFleaDB(File indexFolder)
Opens an existing database.
|
GenericFleaDB(File indexFolder,
org.brutusin.json.spi.JsonSchema jsonSchema)
Creates a persistent database with a Schema determined by the specified
JsonSchema.
|
GenericFleaDB(org.brutusin.json.spi.JsonSchema jsonSchema)
Creates an in-memory instance with a Schema determined by the specified
JsonSchema.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
commit() |
void |
delete(Query q) |
double |
getFacetValueMultiplicity(String facetName,
String facetValue,
Query q) |
List<FacetResponse> |
getFacetValues(Query q,
FacetMultiplicities facetMultiplicities) |
List<FacetResponse> |
getFacetValues(Query q,
int maxFacetValues) |
List<FacetResponse> |
getFacetValuesStartingWith(String facetName,
String prefix,
Query q,
int max) |
protected FleaDBInfo |
getFleaDBInfo() |
File |
getIndexFolder() |
int |
getNumFacetValues(Query q,
String facetName) |
Schema |
getSchema() |
org.brutusin.json.spi.JsonNode |
getSingleResult(Query q) |
void |
optimize() |
Paginator<org.brutusin.json.spi.JsonNode> |
query(Query q) |
Paginator<org.brutusin.json.spi.JsonNode> |
query(Query q,
Sort sort) |
void |
store(org.brutusin.json.spi.JsonNode entity) |
public GenericFleaDB(org.brutusin.json.spi.JsonSchema jsonSchema)
throws IOException
jsonSchema - IOExceptionpublic GenericFleaDB(File indexFolder) throws IOException
indexFolder - IOExceptionpublic GenericFleaDB(File indexFolder, org.brutusin.json.spi.JsonSchema jsonSchema) throws IOException
indexFolder - jsonSchema - IOExceptionpublic File getIndexFolder()
protected final FleaDBInfo getFleaDBInfo()
public org.brutusin.json.spi.JsonNode getSingleResult(Query q)
getSingleResult in interface FleaDB<org.brutusin.json.spi.JsonNode>public final List<FacetResponse> getFacetValues(Query q, int maxFacetValues)
getFacetValues in interface FleaDB<org.brutusin.json.spi.JsonNode>public int getNumFacetValues(Query q, String facetName)
getNumFacetValues in interface FleaDB<org.brutusin.json.spi.JsonNode>public final List<FacetResponse> getFacetValues(Query q, FacetMultiplicities facetMultiplicities)
getFacetValues in interface FleaDB<org.brutusin.json.spi.JsonNode>public final List<FacetResponse> getFacetValuesStartingWith(String facetName, String prefix, Query q, int max)
getFacetValuesStartingWith in interface FleaDB<org.brutusin.json.spi.JsonNode>public final double getFacetValueMultiplicity(String facetName, String facetValue, Query q)
getFacetValueMultiplicity in interface FleaDB<org.brutusin.json.spi.JsonNode>public final Schema getSchema()
public final void delete(Query q)
public final void commit()
public final void store(org.brutusin.json.spi.JsonNode entity)
public void optimize()
throws IOException
IOExceptionCopyright © 2010–2015. All rights reserved.