org.apache.solr.schema
Class CompressableField

java.lang.Object
  extended by org.apache.solr.schema.FieldType
      extended by org.apache.solr.schema.CompressableField
Direct Known Subclasses:
StrField, TextField

public abstract class CompressableField
extends FieldType

CompressableField is an abstract field type which enables a field to be compressed (by specifying compressed="true" at the field definition level) and provides optional support for specifying a threshold at which compression is enabled. Optional settings:

TODO: Enable compression level specification (not yet in lucene)

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.solr.schema.FieldType
FieldType.DefaultAnalyzer
 
Field Summary
static int DEFAULT_COMPRESS_THRESHOLD
           
 
Fields inherited from class org.apache.solr.schema.FieldType
analyzer, args, falseProperties, log, queryAnalyzer, trueProperties, typeName
 
Constructor Summary
CompressableField()
           
 
Method Summary
protected  org.apache.lucene.document.Field.Store getFieldStore(SchemaField field, java.lang.String internalVal)
           
protected  void init(IndexSchema schema, java.util.Map<java.lang.String,java.lang.String> args)
          subclasses should initialize themselves with the args provided and remove valid arguments.
 
Methods inherited from class org.apache.solr.schema.FieldType
createField, getAnalyzer, getFieldIndex, getFieldTermVec, getQueryAnalyzer, getSortField, getStringSort, getTypeName, getValueSource, indexedToReadable, isTokenized, restrictProps, setAnalyzer, setQueryAnalyzer, storedToIndexed, storedToReadable, toExternal, toInternal, toString, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_COMPRESS_THRESHOLD

public static int DEFAULT_COMPRESS_THRESHOLD
Constructor Detail

CompressableField

public CompressableField()
Method Detail

init

protected void init(IndexSchema schema,
                    java.util.Map<java.lang.String,java.lang.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 FieldType

getFieldStore

protected org.apache.lucene.document.Field.Store getFieldStore(SchemaField field,
                                                               java.lang.String internalVal)
Overrides:
getFieldStore in class FieldType


Copyright © 2006 - 2008 The Apache Software Foundation