Package grassyknoll :: Package backend :: Package lucene :: Module Smarts :: Class SmartField
[hide private]

Class SmartField

source code


a field name & value, with instructions on how to save it into the index

XXX need to add support for value lists. Lucene supports multiple fields of the same name in a single doc, shouldn't be too hard.

See Lucene documentation and nested classes for documentation on store, index & termvector. These values may either be attributes of Constants or corresonding string/bool values.

Instance Methods [hide private]
 
__init__(self, value, store=None, index=None, termvector=None, alltext=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
Field
toField(self)
Returns: a Lucene internal representation of this SmartField
source code

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

Class Variables [hide private]
  _default_store = Field.Store.NO
  _default_termvector = Field.TermVector.NO
  _default_alltext = True
Instance Variables [hide private]
Boolean alltext
should the value be included in a default field search
string, bool or Lucene constant index
how to index the document.
String name
name of the Field
string, bool or Lucene constant store
how to store the document.
string, bool or Lucene constant termvector
what sort of term vectors to generate for the document.
basic python types value
value of the Field.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, value, store=None, index=None, termvector=None, alltext=None)
(Constructor)

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

toField(self)

source code 
Returns: Field
a Lucene internal representation of this SmartField

Instance Variable Details [hide private]

index

how to index the document. One of no, tokenized, untokenized, no_norms
Type:
string, bool or Lucene constant

store

how to store the document. One of yes, no, compress
Type:
string, bool or Lucene constant

termvector

what sort of term vectors to generate for the document. One of yes, no, with_offsets, with_positions, with_positions_and_offsets
Type:
string, bool or Lucene constant

value

value of the Field. This is filled in by SmartDoc
Type:
basic python types