org.apache.blur.analysis
Class FieldTypeDefinition

java.lang.Object
  extended by org.apache.blur.analysis.FieldTypeDefinition
Direct Known Subclasses:
CustomFieldTypeDefinition, FieldLessFieldTypeDefinition, NumericFieldTypeDefinition, StoredFieldTypeDefinition, StringFieldTypeDefinition, TextFieldTypeDefinition

public abstract class FieldTypeDefinition
extends Object


Constructor Summary
FieldTypeDefinition()
           
 
Method Summary
abstract  boolean checkSupportForCustomQuery()
           
abstract  boolean checkSupportForFuzzyQuery()
           
abstract  boolean checkSupportForPrefixQuery()
           
abstract  boolean checkSupportForRegexQuery()
           
abstract  boolean checkSupportForSorting()
           
abstract  boolean checkSupportForWildcardQuery()
           
abstract  void configure(String fieldNameForThisInstance, Map<String,String> properties, org.apache.hadoop.conf.Configuration configuration)
          Configures the field type.
 Collection<String> getAlternateFieldNames()
          Gets the alternate field names for this instance.
abstract  org.apache.lucene.analysis.Analyzer getAnalyzerForIndex(String fieldName)
          Gets the Analyzer for indexing this should be the same for the querying unless you have a good reason.
abstract  org.apache.lucene.analysis.Analyzer getAnalyzerForQuery(String fieldName)
          Gets the Analyzer for querying this should be the same for the indexing unless you have a good reason.
 String getColumnName()
           
 org.apache.lucene.search.Query getCustomQuery(String text)
           
 String getFamily()
           
abstract  Iterable<? extends org.apache.lucene.document.Field> getFieldsForColumn(String family, Column column)
          Gets the Fields for indexing from a single Column.
abstract  Iterable<? extends org.apache.lucene.document.Field> getFieldsForSubColumn(String family, Column column, String subName)
          Gets the Fields for indexing from a single Column, but should not be stored because the original value should be stored in the main Column.
 String getFieldType()
           
abstract  String getName()
          Gets the name of the field type.
 Map<String,String> getProperties()
           
abstract  org.apache.lucene.search.SortField getSortField(boolean reverse)
           
 String getSubColumnName()
           
 boolean isFieldLessIndexed()
           
abstract  boolean isNumeric()
           
 boolean isSortEnable()
           
 void setColumnName(String columnName)
           
 void setFamily(String family)
           
 void setFieldLessIndexed(boolean fieldLessIndexed)
           
 void setFieldType(String fieldType)
           
 void setProperties(Map<String,String> properties)
           
 void setSortEnable(boolean sortEnable)
           
 void setSubColumnName(String subColumnName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldTypeDefinition

public FieldTypeDefinition()
Method Detail

getName

public abstract String getName()
Gets the name of the field type.

Returns:
the name.

getAlternateFieldNames

public Collection<String> getAlternateFieldNames()
Gets the alternate field names for this instance. For example in the PointVectorStrategy, there are two field that are created with suffixes from the base field name. For example if the base field name was "fam1.col1" then the two suffix names would be "fam1.col1__x" and "fam1.col1__y".
Returns:
an Iterable of Strings.

configure

public abstract void configure(String fieldNameForThisInstance,
                               Map<String,String> properties,
                               org.apache.hadoop.conf.Configuration configuration)
Configures the field type.

Parameters:
properties - the properties.

getFieldsForColumn

public abstract Iterable<? extends org.apache.lucene.document.Field> getFieldsForColumn(String family,
                                                                                        Column column)
Gets the Fields for indexing from a single Column.

Parameters:
column - the Column
Returns:
the Iterable of fields.

getFieldsForSubColumn

public abstract Iterable<? extends org.apache.lucene.document.Field> getFieldsForSubColumn(String family,
                                                                                           Column column,
                                                                                           String subName)
Gets the Fields for indexing from a single Column, but should not be stored because the original value should be stored in the main Column.

Parameters:
column - the Column
Returns:
the Iterable of fields.

getAnalyzerForIndex

public abstract org.apache.lucene.analysis.Analyzer getAnalyzerForIndex(String fieldName)
Gets the Analyzer for indexing this should be the same for the querying unless you have a good reason.

Parameters:
fieldName - the field name to get the analyzer, this could be the base field name or the alternative.
Returns:
the Analyzer.

getAnalyzerForQuery

public abstract org.apache.lucene.analysis.Analyzer getAnalyzerForQuery(String fieldName)
Gets the Analyzer for querying this should be the same for the indexing unless you have a good reason.

Parameters:
fieldName - the field name to get the analyzer, this could be the base field name or the alternative.
Returns:
the Analyzer.

isFieldLessIndexed

public boolean isFieldLessIndexed()

setFieldLessIndexed

public void setFieldLessIndexed(boolean fieldLessIndexed)

checkSupportForFuzzyQuery

public abstract boolean checkSupportForFuzzyQuery()

checkSupportForWildcardQuery

public abstract boolean checkSupportForWildcardQuery()

checkSupportForPrefixQuery

public abstract boolean checkSupportForPrefixQuery()

checkSupportForRegexQuery

public abstract boolean checkSupportForRegexQuery()

isNumeric

public abstract boolean isNumeric()

checkSupportForCustomQuery

public abstract boolean checkSupportForCustomQuery()

checkSupportForSorting

public abstract boolean checkSupportForSorting()

isSortEnable

public boolean isSortEnable()

setSortEnable

public void setSortEnable(boolean sortEnable)

getCustomQuery

public org.apache.lucene.search.Query getCustomQuery(String text)

getFamily

public String getFamily()

setFamily

public void setFamily(String family)

getColumnName

public String getColumnName()

setColumnName

public void setColumnName(String columnName)

getSubColumnName

public String getSubColumnName()

setSubColumnName

public void setSubColumnName(String subColumnName)

getFieldType

public String getFieldType()

setFieldType

public void setFieldType(String fieldType)

getProperties

public Map<String,String> getProperties()

setProperties

public void setProperties(Map<String,String> properties)

getSortField

public abstract org.apache.lucene.search.SortField getSortField(boolean reverse)


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.