Package ch.rswk.meta.engine
Class MetaLucene
java.lang.Object
ch.rswk.meta.engine.MetaLucene
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.lucene.document.FieldType
static final org.apache.lucene.queryparser.flexible.standard.config.PointsConfig
private static final String
static final String
private static final com.fasterxml.jackson.databind.ObjectWriter
private static final Map
<String, org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> static final org.apache.lucene.queryparser.flexible.standard.config.PointsConfig
private static final org.apache.lucene.document.FieldType
private static final org.slf4j.Logger
private static final String
private static final com.fasterxml.jackson.databind.ObjectWriter
static final String
static final String
private static final com.fasterxml.jackson.databind.ObjectWriter
private static final Map
<String, org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> static final org.apache.lucene.queryparser.flexible.standard.config.PointsConfig
static final String
private static final String
private static final com.fasterxml.jackson.databind.ObjectWriter
static final String
static final String
private static final com.fasterxml.jackson.databind.ObjectWriter
private static final com.fasterxml.jackson.databind.ObjectWriter
private static final com.fasterxml.jackson.databind.ObjectWriter
private static final String
private static final String
private static final String
private static final Map
<String, org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.lucene.search.Query
combineQueries
(List<org.apache.lucene.search.Query> queries, org.apache.lucene.search.BooleanClause.Occur occur) static String
getFieldNames
(org.apache.lucene.document.Document d) static <T> @Nullable T
meltJsonField
(org.apache.lucene.document.Document document, @Nullable Iterable<String> filter, @Nullable Iterable<String> purge, com.fasterxml.jackson.databind.ObjectReader reader, Class<T> type) static org.apache.lucene.search.Query
newBboxQuery
(String field, GeoBox box) static org.apache.lucene.document.Field
newBooleanField
(String name, boolean value) private static org.apache.lucene.document.FieldType
static org.apache.lucene.document.Field
newDateField
(String name, LocalDate value) static org.apache.lucene.document.Field
newDateTimeField
(String name, OffsetDateTime value) static org.apache.lucene.search.Query
newDistanceQuery
(String field, GeoPoint point, double meters) static org.apache.lucene.document.Field
newDoubleField
(String name, double value) static org.apache.lucene.search.Sort
newDoubleSort
(String field, boolean reverse) static org.apache.lucene.document.Document
newFileDocument
(FileInfo info) protected static MetaLucene.QueryContext
newFileQueryContext
(FileSearchRequest request) protected static org.apache.lucene.index.Term
newFileTerm
(String key) static org.apache.lucene.document.Field
newGeoField
(String name, GeoPoint point) static org.apache.lucene.document.Field
newIntField
(String name, int value) static org.apache.lucene.search.Sort
newIntSort
(String field, boolean reverse) static org.apache.lucene.document.Field
newJsonField
(com.fasterxml.jackson.databind.ObjectWriter writer, Object object) private static org.apache.lucene.document.FieldType
static org.apache.lucene.document.Document
protected static MetaLucene.QueryContext
static org.apache.lucene.document.Document
protected static MetaLucene.QueryContext
newLoggingMetricQueryContext
(@Nullable String query) static org.apache.lucene.document.Field
newLongField
(String name, long value) static org.apache.lucene.search.Sort
newLongSort
(String field, boolean reverse) protected static org.apache.lucene.search.Query[]
newMetaDeleteQueries
(String metaId) private static org.apache.lucene.document.Document
newMetaDocument
(Meta meta) static org.apache.lucene.document.Document
static org.apache.lucene.document.Document
newMetaObjectDocument
(MetaObject object) protected static MetaLucene.QueryContext
newMetaQueryContext
(SearchRequest request, Map<String, org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> pointsConfigMap) protected static Set
<org.apache.lucene.search.Query> newMetaSpatialQueries
(SearchRequest request) protected static org.apache.lucene.index.Term
newMetaTerm
(String metaId) static org.apache.lucene.document.Document
protected static MetaLucene.QueryContext
protected static org.apache.lucene.index.Term
newMetaUserConfigTerm
(String identifier) static org.apache.lucene.document.Document
newMetaUserDocument
(MetaUser user) static org.apache.lucene.document.Document
protected static MetaLucene.QueryContext
protected static org.apache.lucene.index.Term
newMetaUserGroupTerm
(String group) protected static MetaLucene.QueryContext
newMetaUserQueryContext
(String query) protected static org.apache.lucene.index.Term
newMetaUserTerm
(String user) static org.apache.lucene.search.Query
newQuery
(org.apache.lucene.queryparser.classic.MultiFieldQueryParser parser, MetaLucene.QueryContext queryContext) static org.apache.lucene.search.Query
newQuery
(org.apache.lucene.queryparser.flexible.standard.StandardQueryParser parser, MetaLucene.QueryContext queryContext) static MetaLucene.QueryContext
newQueryContext
(String defaultField, @Nullable Map<String, org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> pointsConfigMap, String query, @Nullable String sortField, boolean sortReverse) static org.apache.lucene.document.Field
newSortableGeoField
(String name, GeoPoint point) static org.apache.lucene.document.Field
newSortableStringField
(String name, String value) static org.apache.lucene.document.Field
newStringField
(String name, String value) static org.apache.lucene.search.Sort
newStringSort
(String field, boolean reverse) static org.apache.lucene.document.Field
newTextField
(String name, String value) static MetaLucene.QueryContext
newTypedQueryContext
(String defaultField, @Nullable Map<String, org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> pointsConfigMap, @Nullable String query, @Nullable String sortField, boolean sortReverse, String type)
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
DOUBLE_POINTS_CONFIG
public static final org.apache.lucene.queryparser.flexible.standard.config.PointsConfig DOUBLE_POINTS_CONFIG -
FILE_INFO_FIELD_TYPE
- See Also:
-
INT_POINTS_CONFIG
public static final org.apache.lucene.queryparser.flexible.standard.config.PointsConfig INT_POINTS_CONFIG -
LOGGING_FIELD_ENTRY_TYPE
- See Also:
-
LOGGING_FIELD_METRIC_TYPE
- See Also:
-
LONG_POINTS_CONFIG
public static final org.apache.lucene.queryparser.flexible.standard.config.PointsConfig LONG_POINTS_CONFIG -
META_USER_CONFIG_FIELD_TYPE
- See Also:
-
META_USER_FIELD_TYPE
- See Also:
-
META_USER_GROUP_FIELD_TYPE
- See Also:
-
BOOLEAN_FIELD_TYPE
private static final org.apache.lucene.document.FieldType BOOLEAN_FIELD_TYPE -
FIELD_JSON
- See Also:
-
FILE_INFO_ILLEGAL_FIELD_NAMES
-
FILE_INFO_WRITER
private static final com.fasterxml.jackson.databind.ObjectWriter FILE_INFO_WRITER -
FILE_POINTS_CONFIG
-
JSON_FIELD_TYPE
private static final org.apache.lucene.document.FieldType JSON_FIELD_TYPE -
LOGGER_NAME_SEGMENT
- See Also:
-
LOGGING_ENTRY_ILLEGAL_FIELD_NAMES
-
LOGGING_ENTRY_WRITER
private static final com.fasterxml.jackson.databind.ObjectWriter LOGGING_ENTRY_WRITER -
LOGGING_METRIC_WRITER
private static final com.fasterxml.jackson.databind.ObjectWriter LOGGING_METRIC_WRITER -
LOGGING_POINTS_CONFIG
-
META_USER_CONFIG_ILLEGAL_FIELD_NAMES
-
META_USER_CONFIG_NULL_VALUE
-
META_USER_CONFIG_WRITER
private static final com.fasterxml.jackson.databind.ObjectWriter META_USER_CONFIG_WRITER -
META_USER_GROUP_WRITER
private static final com.fasterxml.jackson.databind.ObjectWriter META_USER_GROUP_WRITER -
META_USER_WRITER
private static final com.fasterxml.jackson.databind.ObjectWriter META_USER_WRITER -
META_WRITER
private static final com.fasterxml.jackson.databind.ObjectWriter META_WRITER -
STRING_SORT_FIELD_SUFFIX
- See Also:
-
TYPED_QUERY_FORMAT
- See Also:
-
TYPED_QUERY_JOIN_FORMAT
- See Also:
-
USER_GROUP_POINTS_CONFIG
-
-
Constructor Details
-
MetaLucene
public MetaLucene()
-
-
Method Details
-
newFileDocument
-
newLoggingEntryDocument
-
newLoggingMetricDocument
-
newMetaLogDocument
-
newMetaObjectDocument
-
newMetaDocument
-
newMetaUserDocument
-
newMetaUserGroupDocument
-
newMetaUserConfigDocument
-
getFieldNames
-
newStringField
-
newSortableStringField
-
newTextField
-
newDoubleField
-
newLongField
-
newIntField
-
newBooleanField
-
newDateField
-
newDateTimeField
-
newGeoField
-
newSortableGeoField
-
newJsonField
public static org.apache.lucene.document.Field newJsonField(com.fasterxml.jackson.databind.ObjectWriter writer, Object object) -
meltJsonField
-
newBooleanFieldType
private static org.apache.lucene.document.FieldType newBooleanFieldType() -
newJsonFieldType
private static org.apache.lucene.document.FieldType newJsonFieldType() -
newFileQueryContext
-
newFileTerm
-
newLoggingEntryQueryContext
-
newLoggingMetricQueryContext
-
newMetaQueryContext
protected static MetaLucene.QueryContext newMetaQueryContext(SearchRequest request, Map<String, org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> pointsConfigMap) -
newMetaTerm
-
newMetaSpatialQueries
-
newMetaDeleteQueries
-
newMetaUserQueryContext
-
newMetaUserTerm
-
newMetaUserGroupQueryContext
-
newMetaUserGroupTerm
-
newMetaUserConfigQueryContext
-
newMetaUserConfigTerm
-
newTypedQueryContext
-
newQueryContext
-
escapeQueryPart
-
newQuery
public static org.apache.lucene.search.Query newQuery(org.apache.lucene.queryparser.flexible.standard.StandardQueryParser parser, MetaLucene.QueryContext queryContext) throws org.apache.lucene.queryparser.flexible.core.QueryNodeException - Throws:
org.apache.lucene.queryparser.flexible.core.QueryNodeException
-
newQuery
public static org.apache.lucene.search.Query newQuery(org.apache.lucene.queryparser.classic.MultiFieldQueryParser parser, MetaLucene.QueryContext queryContext) throws org.apache.lucene.queryparser.classic.ParseException - Throws:
org.apache.lucene.queryparser.classic.ParseException
-
newDoubleSort
-
newLongSort
-
newIntSort
-
newStringSort
-
newDistanceQuery
-
newBboxQuery
-
combineQueries
public static org.apache.lucene.search.Query combineQueries(List<org.apache.lucene.search.Query> queries, org.apache.lucene.search.BooleanClause.Occur occur)
-