Class OLuceneIndexEngineUtils
java.lang.Object
com.orientechnologies.lucene.engine.OLuceneIndexEngineUtils
Created by frank on 04/05/2017.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.lucene.search.SortFieldbuildSortField(ODocument conf) BuildsSortFieldfrom a configurationODocumentstatic org.apache.lucene.search.SortFieldbuildSortField(Map<String, Object> conf) Builds aSortFieldfrom a configuration map.static List<org.apache.lucene.search.SortField>buildSortFields(ODocument metadata) static OIndexDefinitiongetIndexDefinitionFromIndex(org.apache.lucene.index.IndexWriter writer) static ODocumentgetMetadataFromIndex(org.apache.lucene.index.IndexWriter writer) static org.apache.lucene.document.DocumentretrieveIndexMetadata(org.apache.lucene.index.IndexWriter writer) static voidsendLookupTime(String indexName, OCommandContext context, org.apache.lucene.search.TopDocs docs, Integer limit, long startFetching) static voidsendTotalHits(String indexName, OCommandContext context, long totalHits)
-
Constructor Details
-
OLuceneIndexEngineUtils
public OLuceneIndexEngineUtils()
-
-
Method Details
-
sendTotalHits
-
sendLookupTime
public static void sendLookupTime(String indexName, OCommandContext context, org.apache.lucene.search.TopDocs docs, Integer limit, long startFetching) -
retrieveIndexMetadata
public static org.apache.lucene.document.Document retrieveIndexMetadata(org.apache.lucene.index.IndexWriter writer) -
buildSortFields
-
buildSortField
BuildsSortFieldfrom a configurationODocument- Parameters:
conf-- Returns:
-
buildSortField
Builds aSortFieldfrom a configuration map. The map can contains up to three fields: field (name), reverse (true/false) and typeSortField.Type.- Parameters:
conf-- Returns:
-
getMetadataFromIndex
-
getIndexDefinitionFromIndex
public static OIndexDefinition getIndexDefinitionFromIndex(org.apache.lucene.index.IndexWriter writer)
-