Wednesday 08 February 2012 11:42:21 am - 4 replies
Hi
I make a fetch with ezfind/search and I would like to sort my results by an object relation. Is anyone knows the syntax ? Because I didn't find it in the documentation.
Thanks
Modified on Wednesday 08 February 2012 11:42:43 am by Solène Guillot
Tuesday 14 February 2012 4:00:26 pm
Hello Solène,
Your english is good, but the question turns out to be tricky ![]()
Have you tried, as stated in the eZ Find doc, to have the following value in the sort_by parameter :
my_class/my_object_relation_attribute
where my_object_relation_attribute is the attribute identifier of your "Object relation" attribute ?
Let us know,
Cheers,
Thursday 16 February 2012 9:15:42 am
Thank you for your answer.
You know the forum is generally my last chance, that's why my requests are tricky ![]()
This code works fine :
my_class/my_object_relation_attribute/name
But I would like to do something like :
my_class/my_object_relation_attribute/published
I think it's not possible...
Wednesday 22 February 2012 3:27:40 am
Hi Solène,
Have you had a look at the indexing of your attributes. Have a look how Solr stores the references to the objects/attributes. You can do this through the Solr admin.
You will see things like (examples of course):
meta_main_url_alias_s submeta_my_categories-id_si subattr_star_rating-my_rating_average_f etc.
You may be able to find the appropriate string there, something like
meta_published_i
Hope this helps.
You must be logged in to post messages in this topic!