public class OLuceneIndexEngineUtils extends Object
Constructor and Description |
---|
OLuceneIndexEngineUtils() |
Modifier and Type | Method and Description |
---|---|
static org.apache.lucene.search.SortField |
buildSortField(Map<String,Object> conf)
Builds a
SortField from a configuration map. |
static org.apache.lucene.search.SortField |
buildSortField(ODocument conf)
Builds
SortField from a configuration ODocument |
static List<org.apache.lucene.search.SortField> |
buildSortFields(ODocument metadata) |
static OIndexDefinition |
getIndexDefinitionFromIndex(org.apache.lucene.index.IndexWriter writer) |
static ODocument |
getMetadataFromIndex(org.apache.lucene.index.IndexWriter writer) |
static org.apache.lucene.document.Document |
retrieveIndexMetadata(org.apache.lucene.index.IndexWriter writer) |
static void |
sendLookupTime(String indexName,
OCommandContext context,
org.apache.lucene.search.TopDocs docs,
Integer limit,
long startFetching) |
static void |
sendTotalHits(String indexName,
OCommandContext context,
long totalHits) |
public static void sendTotalHits(String indexName, OCommandContext context, long totalHits)
public static void sendLookupTime(String indexName, OCommandContext context, org.apache.lucene.search.TopDocs docs, Integer limit, long startFetching)
public static org.apache.lucene.document.Document retrieveIndexMetadata(org.apache.lucene.index.IndexWriter writer)
public static List<org.apache.lucene.search.SortField> buildSortFields(ODocument metadata)
public static org.apache.lucene.search.SortField buildSortField(ODocument conf)
SortField
from a configuration ODocument
conf
- public static org.apache.lucene.search.SortField buildSortField(Map<String,Object> conf)
SortField
from a configuration map. The map can contains up to three fields:
field (name), reverse (true/false) and type SortField.Type
.conf
- public static ODocument getMetadataFromIndex(org.apache.lucene.index.IndexWriter writer)
public static OIndexDefinition getIndexDefinitionFromIndex(org.apache.lucene.index.IndexWriter writer)
Copyright © 2009–2020 OrientDB. All rights reserved.