Class MetaLucene

java.lang.Object
ch.rswk.meta.engine.MetaLucene

public class MetaLucene extends Object
  • 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

      public static final String 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

      public static final String LOGGING_FIELD_ENTRY_TYPE
      See Also:
    • LOGGING_FIELD_METRIC_TYPE

      public static final String 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

      public static final String META_USER_CONFIG_FIELD_TYPE
      See Also:
    • META_USER_FIELD_TYPE

      public static final String META_USER_FIELD_TYPE
      See Also:
    • META_USER_GROUP_FIELD_TYPE

      public static final String META_USER_GROUP_FIELD_TYPE
      See Also:
    • BOOLEAN_FIELD_TYPE

      private static final org.apache.lucene.document.FieldType BOOLEAN_FIELD_TYPE
    • FIELD_JSON

      private static final String FIELD_JSON
      See Also:
    • FILE_INFO_ILLEGAL_FIELD_NAMES

      private static final Set<String> FILE_INFO_ILLEGAL_FIELD_NAMES
    • FILE_INFO_WRITER

      private static final com.fasterxml.jackson.databind.ObjectWriter FILE_INFO_WRITER
    • FILE_POINTS_CONFIG

      private static final Map<String,org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> FILE_POINTS_CONFIG
    • JSON_FIELD_TYPE

      private static final org.apache.lucene.document.FieldType JSON_FIELD_TYPE
    • LOGGER_NAME_SEGMENT

      private static final String LOGGER_NAME_SEGMENT
      See Also:
    • LOGGING_ENTRY_ILLEGAL_FIELD_NAMES

      private static final Set<String> 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

      private static final Map<String,org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> LOGGING_POINTS_CONFIG
    • META_USER_CONFIG_ILLEGAL_FIELD_NAMES

      private static final Set<String> META_USER_CONFIG_ILLEGAL_FIELD_NAMES
    • META_USER_CONFIG_NULL_VALUE

      private static final String 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

      private static final String STRING_SORT_FIELD_SUFFIX
      See Also:
    • TYPED_QUERY_FORMAT

      private static final String TYPED_QUERY_FORMAT
      See Also:
    • TYPED_QUERY_JOIN_FORMAT

      private static final String TYPED_QUERY_JOIN_FORMAT
      See Also:
    • USER_GROUP_POINTS_CONFIG

      private static final Map<String,org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> USER_GROUP_POINTS_CONFIG
  • Constructor Details

    • MetaLucene

      public MetaLucene()
  • Method Details

    • newFileDocument

      public static org.apache.lucene.document.Document newFileDocument(FileInfo info)
    • newLoggingEntryDocument

      public static org.apache.lucene.document.Document newLoggingEntryDocument(LoggingEntry entry)
    • newLoggingMetricDocument

      public static org.apache.lucene.document.Document newLoggingMetricDocument(LoggingMetric metric)
    • newMetaLogDocument

      public static org.apache.lucene.document.Document newMetaLogDocument(MetaLog log)
    • newMetaObjectDocument

      public static org.apache.lucene.document.Document newMetaObjectDocument(MetaObject object)
    • newMetaDocument

      private static org.apache.lucene.document.Document newMetaDocument(Meta meta)
    • newMetaUserDocument

      public static org.apache.lucene.document.Document newMetaUserDocument(MetaUser user)
    • newMetaUserGroupDocument

      public static org.apache.lucene.document.Document newMetaUserGroupDocument(MetaUserGroup group)
    • newMetaUserConfigDocument

      public static org.apache.lucene.document.Document newMetaUserConfigDocument(MetaUserConfig config)
    • getFieldNames

      public static SortedSet<String> getFieldNames(org.apache.lucene.document.Document d)
    • newStringField

      public static org.apache.lucene.document.Field newStringField(String name, String value)
    • newSortableStringField

      public static org.apache.lucene.document.Field newSortableStringField(String name, String value)
    • newTextField

      public static org.apache.lucene.document.Field newTextField(String name, String value)
    • newDoubleField

      public static org.apache.lucene.document.Field newDoubleField(String name, double value)
    • newLongField

      public static org.apache.lucene.document.Field newLongField(String name, long value)
    • newIntField

      public static org.apache.lucene.document.Field newIntField(String name, int value)
    • newBooleanField

      public static org.apache.lucene.document.Field newBooleanField(String name, boolean value)
    • newDateField

      public static org.apache.lucene.document.Field newDateField(String name, LocalDate value)
    • newDateTimeField

      public static org.apache.lucene.document.Field newDateTimeField(String name, OffsetDateTime value)
    • newGeoField

      public static org.apache.lucene.document.Field newGeoField(String name, GeoPoint point)
    • newSortableGeoField

      public static org.apache.lucene.document.Field newSortableGeoField(String name, GeoPoint point)
    • newJsonField

      public static org.apache.lucene.document.Field newJsonField(com.fasterxml.jackson.databind.ObjectWriter writer, Object object)
    • meltJsonField

      public 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)
    • newBooleanFieldType

      private static org.apache.lucene.document.FieldType newBooleanFieldType()
    • newJsonFieldType

      private static org.apache.lucene.document.FieldType newJsonFieldType()
    • newFileQueryContext

      protected static MetaLucene.QueryContext newFileQueryContext(FileSearchRequest request)
    • newFileTerm

      protected static org.apache.lucene.index.Term newFileTerm(String key)
    • newLoggingEntryQueryContext

      protected static MetaLucene.QueryContext newLoggingEntryQueryContext(String query)
    • newLoggingMetricQueryContext

      protected static MetaLucene.QueryContext newLoggingMetricQueryContext(@Nullable String query)
    • newMetaQueryContext

      protected static MetaLucene.QueryContext newMetaQueryContext(SearchRequest request, Map<String,org.apache.lucene.queryparser.flexible.standard.config.PointsConfig> pointsConfigMap)
    • newMetaTerm

      protected static org.apache.lucene.index.Term newMetaTerm(String metaId)
    • newMetaSpatialQueries

      protected static Set<org.apache.lucene.search.Query> newMetaSpatialQueries(SearchRequest request)
    • newMetaDeleteQueries

      protected static org.apache.lucene.search.Query[] newMetaDeleteQueries(String metaId)
    • newMetaUserQueryContext

      protected static MetaLucene.QueryContext newMetaUserQueryContext(String query)
    • newMetaUserTerm

      protected static org.apache.lucene.index.Term newMetaUserTerm(String user)
    • newMetaUserGroupQueryContext

      protected static MetaLucene.QueryContext newMetaUserGroupQueryContext(String query)
    • newMetaUserGroupTerm

      protected static org.apache.lucene.index.Term newMetaUserGroupTerm(String group)
    • newMetaUserConfigQueryContext

      protected static MetaLucene.QueryContext newMetaUserConfigQueryContext(String query)
    • newMetaUserConfigTerm

      protected static org.apache.lucene.index.Term newMetaUserConfigTerm(String identifier)
    • newTypedQueryContext

      public 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)
    • newQueryContext

      public 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)
    • escapeQueryPart

      public static String escapeQueryPart(String s)
    • 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

      public static org.apache.lucene.search.Sort newDoubleSort(String field, boolean reverse)
    • newLongSort

      public static org.apache.lucene.search.Sort newLongSort(String field, boolean reverse)
    • newIntSort

      public static org.apache.lucene.search.Sort newIntSort(String field, boolean reverse)
    • newStringSort

      public static org.apache.lucene.search.Sort newStringSort(String field, boolean reverse)
    • newDistanceQuery

      public static org.apache.lucene.search.Query newDistanceQuery(String field, GeoPoint point, double meters)
    • newBboxQuery

      public static org.apache.lucene.search.Query newBboxQuery(String field, GeoBox box)
    • combineQueries

      public static org.apache.lucene.search.Query combineQueries(List<org.apache.lucene.search.Query> queries, org.apache.lucene.search.BooleanClause.Occur occur)