wanovak
wanovak

Reputation: 6127

Array as index for Zend_Search_Lucene_Field

This is what works:

$doc->addField(Zend_Search_Lucene_Field::text('Image', $item['Image']['localName']));

which indexes the field, and it's accessible later in my view helper as this:

$item['Image']

However, what I want (without a work-around in my view helper,) is for it to be accessible like this:

$item['Image']['localName']

... This doesn't work:

$doc->addField(Zend_Search_Lucene_Field::text(array('Image' => 'localName'), $item['Image']['localName']));

Is this even possible?

Upvotes: 0

Views: 204

Answers (1)

wanovak
wanovak

Reputation: 6127

Zend_Search_Lucene_Field::text expects the first parameter to be a string, not an array. Therefore, the proposed method is not possible.

Upvotes: 1

Related Questions