Skip to content

Commit 1b7ab4b

Browse files
committed
Allow indexed and stored field mapping for Zend Lucene
1 parent d324e48 commit 1b7ab4b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Search/Adapter/ZendLuceneAdapter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ public function index(Document $document, $indexName)
139139
$this->encoding
140140
);
141141
break;
142+
case Field::INDEX_STORED_INDEXED:
143+
$luceneField = Lucene\Document\Field::text(
144+
$field->getName(),
145+
$field->getValue(),
146+
$this->encoding
147+
);
148+
break;
142149
default:
143150
throw new \InvalidArgumentException(
144151
sprintf(

Search/Field.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ class Field
5151
*/
5252
const INDEX_UNSTORED = 'unstored';
5353

54+
/**
55+
* Indexed and stored
56+
*/
57+
const INDEX_STORED_INDEXED = 'stored_indexed';
58+
5459
public static function getValidTypes()
5560
{
5661
return array(

0 commit comments

Comments
 (0)