org.apache.solr.schema
Class TextField

java.lang.Object
  extended by org.apache.solr.schema.FieldType
      extended by org.apache.solr.schema.CompressableField
          extended by org.apache.solr.schema.TextField

public class TextField
extends CompressableField

TextField is the basic type for configurable text analysis. Analyzers for field types using this implementation should be defined in the schema.

Version:
$Id: TextField.java 479793 2006-11-27 22:40:21Z klaas $
Author:
yonik

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.solr.schema.FieldType
FieldType.DefaultAnalyzer
 
Field Summary
 
Fields inherited from class org.apache.solr.schema.CompressableField
DEFAULT_COMPRESS_THRESHOLD
 
Fields inherited from class org.apache.solr.schema.FieldType
analyzer, args, falseProperties, log, queryAnalyzer, trueProperties, typeName
 
Constructor Summary
TextField()
           
 
Method Summary
 SortField getSortField(SchemaField field, boolean reverse)
          Returns the SortField instance that should be used to sort fields of this type.
protected  void init(IndexSchema schema, Map<String,String> args)
          subclasses should initialize themselves with the args provided and remove valid arguments.
 void write(TextResponseWriter writer, String name, Fieldable f)
          calls back to TextResponseWriter to write the field value
 void write(XMLWriter xmlWriter, String name, Fieldable f)
          Renders the specified field as XML
 
Methods inherited from class org.apache.solr.schema.CompressableField
getFieldStore
 
Methods inherited from class org.apache.solr.schema.FieldType
createField, getAnalyzer, getFieldIndex, getFieldTermVec, getQueryAnalyzer, getStringSort, getTypeName, getValueSource, indexedToReadable, isTokenized, restrictProps, setAnalyzer, setQueryAnalyzer, storedToIndexed, storedToReadable, toExternal, toInternal, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextField

public TextField()
Method Detail

init

protected void init(IndexSchema schema,
                    Map<String,String> args)
Description copied from class: FieldType
subclasses should initialize themselves with the args provided and remove valid arguments. leftover arguments will cause an exception. Common boolean properties have already been handled.

Overrides:
init in class CompressableField

getSortField

public SortField getSortField(SchemaField field,
                              boolean reverse)
Description copied from class: FieldType
Returns the SortField instance that should be used to sort fields of this type.

Specified by:
getSortField in class FieldType

write

public void write(XMLWriter xmlWriter,
                  String name,
                  Fieldable f)
           throws IOException
Description copied from class: FieldType
Renders the specified field as XML

Specified by:
write in class FieldType
Throws:
IOException

write

public void write(TextResponseWriter writer,
                  String name,
                  Fieldable f)
           throws IOException
Description copied from class: FieldType
calls back to TextResponseWriter to write the field value

Specified by:
write in class FieldType
Throws:
IOException


Copyright © 2006 - 2009 The Apache Software Foundation