views:

113

answers:

1

I wanted to know if Zend Lucene supports multivalued fields. I tried passing a an array to a field and it doesnt give any errors during indexing. But its not returning any results when i search. Any help is appreciated.

A: 

It doesn't:

Fields are always stored and returned from the index in UTF-8 encoding. Any required conversion to UTF-8 happens automatically.

I would think UTF-8 Encoding an array would not work, unless there's some recursion happening there. You could join the array with a "," or something or serialize or json_encode the array. If you are using it as a search index that might not work though. You could also use the Binary field type if you need to store something more complex like an image or something.

Typeoneerror