Package ch.rswk.meta.engine.test
Class LuceneServiceTest
java.lang.Object
ch.rswk.meta.engine.test.AbstractEngineServiceTest
ch.rswk.meta.engine.test.LuceneServiceTest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.lucene.document.Document
private static final String
private static final String
private static final String
private static final org.slf4j.Logger
protected LuceneService
static final String
private static final org.apache.lucene.document.Document[]
private static final String
Fields inherited from class ch.rswk.meta.engine.test.AbstractEngineServiceTest
runtime
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
assertCursor
(LuceneService.SearchResult result, @Nullable LuceneService.SearchResult previousResult) private static void
assertDocuments
(List<org.apache.lucene.document.Document> documents, LuceneService.SearchResult searchResult) void
static void
void
cursor()
void
private static List
<org.apache.lucene.document.Document> getSortedSortDocuments
(org.apache.lucene.document.Document[] documents) newLuceneServiceTestConfig
(@Nullable Path indexDir) private static org.apache.lucene.document.Document
private static org.apache.lucene.document.Document
newTestDocument
(String text, double number) void
range()
void
void
private static LuceneService.SearchResult
searchTestDocuments
(LuceneService service, int limit) private static LuceneService.SearchResult
searchTestDocuments2
(LuceneService.LuceneContext context, int limit) void
setup()
void
void
void
void
spatial()
void
teardown()
void
void
private static LuceneService.SearchResult
writeDocumentsAndSearch
(LuceneService luceneService, String queryString, String defaultField, @Nullable org.apache.lucene.search.Sort sort, org.apache.lucene.document.Document... documents) Methods inherited from class ch.rswk.meta.engine.test.AbstractEngineServiceTest
setupServices, startUpAndShutDown, teardownServices
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
TEST_SERVICE
- See Also:
-
DOCUMENT
private static final org.apache.lucene.document.Document DOCUMENT -
DOCUMENT_FIELD
- See Also:
-
DOCUMENT_FIELD_VALUE
- See Also:
-
DOCUMENT_NUMBER_FIELD
- See Also:
-
TEST_SORTED_DOCUMENT_FIELD
- See Also:
-
TEST_SORT_DOCUMENTS
private static final org.apache.lucene.document.Document[] TEST_SORT_DOCUMENTS -
luceneService
-
-
Constructor Details
-
LuceneServiceTest
public LuceneServiceTest()
-
-
Method Details
-
setup
- Throws:
Exception
-
teardown
- Throws:
Exception
-
backupAndRestore
- Throws:
Exception
-
writeAndSearch
- Throws:
Exception
-
write_10000
- Throws:
Exception
-
searchAndWrite
- Throws:
Exception
-
searchTestDocuments
private static LuceneService.SearchResult searchTestDocuments(LuceneService service, int limit) throws Exception - Throws:
Exception
-
searchTestDocuments2
private static LuceneService.SearchResult searchTestDocuments2(LuceneService.LuceneContext context, int limit) -
cursor
- Throws:
Exception
-
assertCursor
private static void assertCursor(LuceneService.SearchResult result, @Nullable LuceneService.SearchResult previousResult) -
cursor_sorted
- Throws:
Exception
-
newSortedDocument
-
range
- Throws:
Exception
-
range_sort
- Throws:
Exception
-
newTestDocument
-
sort_string
- Throws:
Exception
-
sort_number
- Throws:
Exception
-
sort_number_reverse
- Throws:
Exception
-
getSortedSortDocuments
private static List<org.apache.lucene.document.Document> getSortedSortDocuments(org.apache.lucene.document.Document[] documents) -
writeDocumentsAndSearch
private static LuceneService.SearchResult writeDocumentsAndSearch(LuceneService luceneService, String queryString, String defaultField, @Nullable org.apache.lucene.search.Sort sort, org.apache.lucene.document.Document... documents) throws Exception - Throws:
Exception
-
assertDocuments
private static void assertDocuments(List<org.apache.lucene.document.Document> documents, LuceneService.SearchResult searchResult) -
spatial
- Throws:
Exception
-
cleanup
- Throws:
IOException
-
newLuceneServiceTestConfig
-