This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Extensions » eZ Find - FieldsToReturn

eZ Find - FieldsToReturn

eZ Find - FieldsToReturn

Monday 24 October 2011 4:36:54 pm - 4 replies

Hello everyone,

is there any way in eZ Find to fetch the values of couple of specific fields in Solr index?

I tried using FieldsToReturn parameter in eZSolr::search method, but it doesn't let me access the data because $searchResult['SearchExtras'] does not have a getter for "response" field in result array, only for "responseHeader", and result array in search extras is by itself protected so I cannot access it directly.


Wednesday 09 November 2011 4:46:59 pm

I've been facing this problem when calling eZ Find with asObject to false (for performance purpose). There is a loop ezsolr.php (around line 900) that removes every result that are not with prefix "meta" or "as" (for solr storage).

It means that if your FieldToReturn is a attribute it will not be return.

I would be tempted to make a pull request on this but I guess it's by design to remove attribute (don't know why thus ...).

Wednesday 09 November 2011 5:00:26 pm

Hey Matthieu,

yeah, I figured out that it returns only fields prefixed with "meta_" (forgot to update the post), which is a real shame because I needed this functionality couple of times to avoid the MySQL database completely.

I'd say go for it with pull request as I also don't see why this would be by design.

Thursday 16 February 2012 11:42:37 am

Pull request by Matthieu on the topic :

Please have a look at this !

Cheers and thanks Matthieu !

Thursday 16 February 2012 12:48:02 pm

Posted my comment on pull request.

Thanks for initiative Matthieu! happy.gif Emoticon


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from