Detailed Description

DefaultIndexStrategy implements indexing of PersistentObject values and might be customized by overriding the isIncluded and/or enhanceDocument methods.

Which values will be added to the index is controlled by the tag SEARCHABLE (see AttributeDescription) in the following way:

  • If no value is tagged as SEARCHABLE, all values will be included in the index
  • If at least one value is tagged as SEARCHABLE, only values with this tag will be included in the index

This allows to exclude certain values from the index by omitting the tag while setting it on the other values.

Definition at line 32 of file DefaultIndexStrategy.php.

+ Inheritance diagram for DefaultIndexStrategy:

Public Member Functions

 getDocument (PersistentObject $obj, $language)
 
 encodeValue ($value, $inputType)
 

Protected Member Functions

 isIncluded (PersistentObject $obj, $language)
 
 enhanceDocument (Document $doc, PersistentObject $obj, $language)
 

Member Function Documentation

getDocument ( PersistentObject  $obj,
  $language 
)
See also
IndexStrategy::getDocument()

Implements IndexStrategy.

Definition at line 37 of file DefaultIndexStrategy.php.

encodeValue (   $value,
  $inputType 
)
See also
IndexStrategy::encodeValue()

Implements IndexStrategy.

Definition at line 88 of file DefaultIndexStrategy.php.

isIncluded ( PersistentObject  $obj,
  $language 
)
protected

Determine whether the object is included in the index or not.

Parameters
$objThe object to index
$languageThe language
Returns
Boolean

Definition at line 101 of file DefaultIndexStrategy.php.

enhanceDocument ( Document  $doc,
PersistentObject  $obj,
  $language 
)
protected

Customize the lucene document according the the application requirements.

Parameters
$docThe lucene document
$objThe object to index
$languageThe language

Definition at line 111 of file DefaultIndexStrategy.php.