Package xappy :: Module fieldactions :: Class FieldActions
[frames] | no frames]

Class FieldActions

source code

object --+
         |
        FieldActions

An object describing the actions to be performed on a field.

The supported actions are:



Instance Methods
 
__init__(self, fieldname)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
add(self, field_mappings, action, **kwargs)
Add an action to perform on a field.
source code
 
perform(self, doc, value, context)
Perform the actions on the field.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  STORE_CONTENT = 1
  INDEX_EXACT = 2
  INDEX_FREETEXT = 3
  SORTABLE = 4
  COLLAPSE = 5
  TAG = 6
  FACET = 7
  SORT_AND_COLLAPSE = -1
Properties

Inherited from object: __class__

Method Details

__init__(self, fieldname)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

perform(self, doc, value, context)

source code 

Perform the actions on the field.

  • doc is a ProcessedDocument to store the result of the actions in.
  • value is a string holding the value of the field.
  • context is an ActionContext object used to keep state in.