public abstract class IndexProviderTest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,KeyInformation> |
allKeys |
static String |
ANALYZED |
static String |
BOOLEAN |
static String |
BOUNDARY |
static String |
DATE |
static String |
FULL_TEXT |
protected IndexProvider |
index |
protected IndexFeatures |
indexFeatures |
protected KeyInformation.IndexRetriever |
indexRetriever |
static String |
KEYWORD |
static String |
LOCATION |
static String |
NAME |
static String |
PHONE_LIST |
static String |
PHONE_SET |
static String |
STRING |
static String |
TEXT |
static String |
TEXT_STRING |
static String |
TIME |
static String |
TIME_TICK |
protected IndexTransaction |
tx |
static String |
WEIGHT |
| Constructor and Description |
|---|
IndexProviderTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(String store,
String documentId,
com.google.common.collect.Multimap<String,Object> doc,
boolean isNew) |
protected void |
assumeIndexSupportFor(Mapping mapping,
JanusGraphPredicate predicate)
Tests the index to ensure it supports the provided mapping,
and the provided predicate.
|
void |
clearStorageTest() |
void |
clopen() |
void |
close() |
protected long |
getDocCountByPredicate(JanusGraphPredicate predicate,
String field,
String condition) |
com.google.common.collect.Multimap<String,Object> |
getDocument(String txt,
long time,
double weight,
Geoshape location,
Geoshape boundary,
List<String> phoneList,
Set<String> phoneSet,
Instant date,
Boolean bool) |
abstract String |
getEnglishAnalyzerName() |
static KeyInformation.IndexRetriever |
getIndexRetriever(Map<String,KeyInformation> mappings) |
abstract String |
getKeywordAnalyzerName() |
static Map<String,KeyInformation> |
getMapping(IndexFeatures indexFeatures,
String englishAnalyzerName,
String keywordAnalyzerName,
Mapping fullGeoShapeMapping) |
static com.google.common.collect.Multimap<String,Object> |
getRandomDocument() |
protected void |
initialize(String store) |
void |
largeTest() |
void |
multipleStores() |
void |
newTx() |
static StandardKeyInformation |
of(Class<?> clazz,
Cardinality cardinality,
Parameter<?>... paras) |
void |
open() |
void |
openClose() |
abstract IndexProvider |
openIndex() |
IndexTransaction |
openTx() |
abstract Mapping |
preferredGeoShapeMapping() |
static void |
printResult(Iterable<RawQuery.Result<String>> result) |
void |
setUp() |
void |
singleStore() |
abstract boolean |
supportsLuceneStyleQueries() |
protected boolean |
supportsPredicateFor(Mapping mapping,
Class<?> dataType,
Cardinality cardinality,
JanusGraphPredicate predicate) |
protected boolean |
supportsPredicateFor(Mapping mapping,
Class<?> dataType,
JanusGraphPredicate predicate) |
protected boolean |
supportsPredicateFor(Mapping mapping,
JanusGraphPredicate predicate) |
void |
tearDown() |
void |
testAddFieldThenDeleteDoc() |
void |
testCommonSupport() |
void |
testConflictingAdd() |
void |
testCustomAnalyzer()
Test custom analyzer
|
void |
testDeleteDocumentThenAddField() |
void |
testDeleteDocumentThenDeleteField() |
void |
testDeleteDocumentThenModifyField() |
void |
testLastWriteWins() |
void |
testPersistentIndexData() |
void |
testRestore() |
void |
testScroll() |
void |
testStringPredicate(JanusGraphPredicate predicate,
boolean expected,
String value,
String condition) |
void |
testTextPredicate(JanusGraphPredicate predicate,
boolean expected,
String value,
String condition) |
void |
testTTL() |
void |
testUpdateAddition()
Test overwriting a single existing field on an existing document
(isNew=false).
|
void |
testUpdateDeletion()
Test deleting a single field from a single document (deleteAll=false).
|
protected IndexProvider index
protected IndexFeatures indexFeatures
protected IndexTransaction tx
protected Map<String,KeyInformation> allKeys
protected KeyInformation.IndexRetriever indexRetriever
public static final String TEXT
public static final String TIME
public static final String WEIGHT
public static final String LOCATION
public static final String BOUNDARY
public static final String NAME
public static final String PHONE_LIST
public static final String PHONE_SET
public static final String DATE
public static final String TIME_TICK
public static final String STRING
public static final String ANALYZED
public static final String FULL_TEXT
public static final String KEYWORD
public static final String TEXT_STRING
public static final String BOOLEAN
public static StandardKeyInformation of(Class<?> clazz, Cardinality cardinality, Parameter<?>... paras)
public static KeyInformation.IndexRetriever getIndexRetriever(Map<String,KeyInformation> mappings)
public static Map<String,KeyInformation> getMapping(IndexFeatures indexFeatures, String englishAnalyzerName, String keywordAnalyzerName, Mapping fullGeoShapeMapping)
public abstract IndexProvider openIndex() throws BackendException
BackendExceptionpublic abstract boolean supportsLuceneStyleQueries()
public abstract String getEnglishAnalyzerName()
public abstract String getKeywordAnalyzerName()
public abstract Mapping preferredGeoShapeMapping()
public void open()
throws BackendException
BackendExceptionpublic void newTx()
throws BackendException
BackendExceptionpublic IndexTransaction openTx() throws BackendException
BackendExceptionpublic void close()
throws BackendException
BackendExceptionpublic void clopen()
throws BackendException
BackendException@Test public void openClose()
@Test public void testCommonSupport()
@Test
public void testDeleteDocumentThenDeleteField()
throws Exception
Exception@Test
public void testDeleteDocumentThenModifyField()
throws Exception
Exception@Test
public void testDeleteDocumentThenAddField()
throws Exception
Exception@Test
public void testAddFieldThenDeleteDoc()
throws Exception
Exception@Test
public void testUpdateAddition()
throws Exception
Exception@Test
public void testUpdateDeletion()
throws Exception
Exception@Test
public void testCustomAnalyzer()
throws Exception
Exception@Test
public void testScroll()
throws BackendException
BackendException@Test
public void testPersistentIndexData()
throws BackendException
BackendException@ParameterizedTest @MethodSource(value="org.janusgraph.core.attribute.TextArgument#text") public void testTextPredicate(JanusGraphPredicate predicate, boolean expected, String value, String condition) throws BackendException
BackendException@ParameterizedTest @MethodSource(value="org.janusgraph.core.attribute.TextArgument#string") public void testStringPredicate(JanusGraphPredicate predicate, boolean expected, String value, String condition) throws BackendException
BackendExceptionprotected void assumeIndexSupportFor(Mapping mapping, JanusGraphPredicate predicate)
mapping - predicate - protected boolean supportsPredicateFor(Mapping mapping, Class<?> dataType, Cardinality cardinality, JanusGraphPredicate predicate)
protected boolean supportsPredicateFor(Mapping mapping, Class<?> dataType, JanusGraphPredicate predicate)
protected boolean supportsPredicateFor(Mapping mapping, JanusGraphPredicate predicate)
protected long getDocCountByPredicate(JanusGraphPredicate predicate, String field, String condition) throws BackendException
BackendExceptionprotected void initialize(String store) throws BackendException
BackendExceptionprotected void add(String store, String documentId, com.google.common.collect.Multimap<String,Object> doc, boolean isNew)
public com.google.common.collect.Multimap<String,Object> getDocument(String txt, long time, double weight, Geoshape location, Geoshape boundary, List<String> phoneList, Set<String> phoneSet, Instant date, Boolean bool)
public static com.google.common.collect.Multimap<String,Object> getRandomDocument()
public static void printResult(Iterable<RawQuery.Result<String>> result)
Copyright © 2012–2024. All rights reserved.