Class FieldFactory
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.lucene.FieldFactory
-
public final class FieldFactory extends java.lang.Object
A factory for Lucene Field instances with frequently used fields.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canCreateTypedField(Type<?> type)
static java.lang.Long
dateToLong(java.lang.String date)
Date values are saved with sec resolutionstatic Field
newAncestorsField(java.lang.String path)
static java.util.Collection<Field>
newBinSimilarityFields(java.lang.String name, java.lang.String value)
static java.util.Collection<Field>
newBinSimilarityFields(java.lang.String name, Blob value)
static Field
newDepthField(java.lang.String path)
static Field
newFulltextField(java.lang.String value)
static Field
newFulltextField(java.lang.String value, boolean stored)
static Field
newFulltextField(java.lang.String name, java.lang.String value)
static Field
newFulltextField(java.lang.String name, java.lang.String value, boolean stored)
static Field
newPathField(java.lang.String path)
static Field
newPropertyField(java.lang.String name, java.lang.String value, boolean tokenized, boolean stored)
static java.util.Collection<Field>
newSimilarityFields(java.lang.String name, java.lang.String value)
static java.util.Collection<Field>
newSimilarityFields(java.lang.String name, Blob value)
static Field
newSuggestField(java.lang.String... values)
-
-
-
Method Detail
-
canCreateTypedField
public static boolean canCreateTypedField(Type<?> type)
-
newPathField
public static Field newPathField(java.lang.String path)
-
newPropertyField
public static Field newPropertyField(java.lang.String name, java.lang.String value, boolean tokenized, boolean stored)
-
newSimilarityFields
public static java.util.Collection<Field> newSimilarityFields(java.lang.String name, Blob value) throws java.io.IOException
- Throws:
java.io.IOException
-
newBinSimilarityFields
public static java.util.Collection<Field> newBinSimilarityFields(java.lang.String name, Blob value) throws java.io.IOException
- Throws:
java.io.IOException
-
newSimilarityFields
public static java.util.Collection<Field> newSimilarityFields(java.lang.String name, java.lang.String value)
-
newBinSimilarityFields
public static java.util.Collection<Field> newBinSimilarityFields(java.lang.String name, java.lang.String value)
-
newFulltextField
public static Field newFulltextField(java.lang.String value)
-
newFulltextField
public static Field newFulltextField(java.lang.String name, java.lang.String value)
-
newFulltextField
public static Field newFulltextField(java.lang.String value, boolean stored)
-
newFulltextField
public static Field newFulltextField(java.lang.String name, java.lang.String value, boolean stored)
-
newAncestorsField
public static Field newAncestorsField(java.lang.String path)
-
newDepthField
public static Field newDepthField(java.lang.String path)
-
newSuggestField
public static Field newSuggestField(java.lang.String... values)
-
dateToLong
public static java.lang.Long dateToLong(java.lang.String date)
Date values are saved with sec resolution- Parameters:
date
- jcr data string- Returns:
- date value in seconds
-
-