org.apache.blur.analysis.type
Class ExampleType

java.lang.Object
  extended by org.apache.blur.analysis.FieldTypeDefinition
      extended by org.apache.blur.analysis.type.CustomFieldTypeDefinition
          extended by org.apache.blur.analysis.type.ExampleType

public class ExampleType
extends CustomFieldTypeDefinition


Constructor Summary
ExampleType()
           
 
Method Summary
 void configure(String fieldNameForThisInstance, Map<String,String> properties, org.apache.hadoop.conf.Configuration configuration)
          Configures this instance for the type.
 org.apache.lucene.search.Query getCustomQuery(String text)
          Gets the query from the text provided by the query parser.
 Iterable<? extends org.apache.lucene.document.Field> getFieldsForColumn(String family, Column column)
          Create Fields for the index as well as for storing the original data for retrieval.
 Iterable<? extends org.apache.lucene.document.Field> getFieldsForSubColumn(String family, Column column, String subName)
          Create Fields for the index do NOT store the data because the is a sub column.
 String getName()
          Get the name of the type.
 org.apache.lucene.search.SortField getSortField(boolean reverse)
           
 
Methods inherited from class org.apache.blur.analysis.type.CustomFieldTypeDefinition
checkSupportForCustomQuery, checkSupportForFuzzyQuery, checkSupportForPrefixQuery, checkSupportForRegexQuery, checkSupportForSorting, checkSupportForWildcardQuery, getAnalyzerForIndex, getAnalyzerForQuery, isNumeric
 
Methods inherited from class org.apache.blur.analysis.FieldTypeDefinition
getAlternateFieldNames, getColumnName, getFamily, getFieldType, getProperties, getSubColumnName, isFieldLessIndexed, isSortEnable, setColumnName, setFamily, setFieldLessIndexed, setFieldType, setProperties, setSortEnable, setSubColumnName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExampleType

public ExampleType()
Method Detail

getName

public String getName()
Get the name of the type.

Specified by:
getName in class FieldTypeDefinition
Returns:
the name.

configure

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

Specified by:
configure in class FieldTypeDefinition
Parameters:
fieldNameForThisInstance - the field name for this instance.
properties - the properties passed into this type definition from the Blur.Iface#addColumnDefinition(String, org.apache.blur.thrift.generated.ColumnDefinition) method.

getFieldsForColumn

public Iterable<? extends org.apache.lucene.document.Field> getFieldsForColumn(String family,
                                                                               Column column)
Create Fields for the index as well as for storing the original data for retrieval.

Specified by:
getFieldsForColumn in class FieldTypeDefinition
Parameters:
family - the family name.
column - the column that holds the name and value.
Returns:
the Iterable of Fields.

getFieldsForSubColumn

public Iterable<? extends org.apache.lucene.document.Field> getFieldsForSubColumn(String family,
                                                                                  Column column,
                                                                                  String subName)
Create Fields for the index do NOT store the data because the is a sub column.

Specified by:
getFieldsForSubColumn in class FieldTypeDefinition
Parameters:
family - the family name.
column - the column that holds the name and value.
subName - the sub column name.
Returns:
the Iterable of Fields.

getCustomQuery

public org.apache.lucene.search.Query getCustomQuery(String text)
Gets the query from the text provided by the query parser.

Overrides:
getCustomQuery in class FieldTypeDefinition
Parameters:
text - the text provided by the query parser.
Returns:
the Query.

getSortField

public org.apache.lucene.search.SortField getSortField(boolean reverse)
Overrides:
getSortField in class CustomFieldTypeDefinition


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