org.apache.solr.schema
Class SortableLongField

java.lang.Object
  extended by org.apache.solr.schema.FieldType
      extended by org.apache.solr.schema.SortableLongField

public class SortableLongField
extends FieldType

Version:
$Id: SortableLongField.java 816202 2009-09-17 14:08:13Z 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.FieldType
analyzer, args, falseProperties, log, queryAnalyzer, trueProperties, typeName
 
Constructor Summary
SortableLongField()
           
 
Method Summary
 SortField getSortField(SchemaField field, boolean reverse)
          Returns the SortField instance that should be used to sort fields of this type.
 ValueSource getValueSource(SchemaField field)
           
 String indexedToReadable(String indexedForm)
          Given an indexed term, return the human readable representation
protected  void init(IndexSchema schema, Map<String,String> args)
          subclasses should initialize themselves with the args provided and remove valid arguments.
 String toExternal(Fieldable f)
          Convert the stored-field format to an external (string, human readable) value
 String toInternal(String val)
          Convert an external value (from XML update command or from query string) into the internal format for both storing and indexing (which can be modified by any analyzers).
 Long toObject(Fieldable f)
          Convert the stored-field format to an external object.
 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.FieldType
createField, getAnalyzer, getArg, getFieldIndex, getFieldStore, getFieldTermVec, getQueryAnalyzer, getRangeQuery, getStringSort, getTypeName, getValueSource, isMultiValued, isTokenized, multiValuedFieldCache, readableToIndexed, restrictProps, setAnalyzer, setQueryAnalyzer, storedToIndexed, storedToReadable, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortableLongField

public SortableLongField()
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 FieldType

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

getValueSource

public ValueSource getValueSource(SchemaField field)
Overrides:
getValueSource in class FieldType

toInternal

public String toInternal(String val)
Description copied from class: FieldType
Convert an external value (from XML update command or from query string) into the internal format for both storing and indexing (which can be modified by any analyzers).

Overrides:
toInternal in class FieldType
See Also:
FieldType.toExternal(org.apache.lucene.document.Fieldable)

indexedToReadable

public String indexedToReadable(String indexedForm)
Description copied from class: FieldType
Given an indexed term, return the human readable representation

Overrides:
indexedToReadable in class FieldType

toExternal

public String toExternal(Fieldable f)
Description copied from class: FieldType
Convert the stored-field format to an external (string, human readable) value

Overrides:
toExternal in class FieldType
See Also:
FieldType.toInternal(java.lang.String)

toObject

public Long toObject(Fieldable f)
Description copied from class: FieldType
Convert the stored-field format to an external object.

Overrides:
toObject in class FieldType
See Also:
FieldType.toInternal(java.lang.String)

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 © 2010 Apache Software Foundation. All Rights Reserved.