Closed RafaPolit closed 8 years ago
In order to get the thesauri sorted by order field you need to index that field in solr.
To do that, you have to find "order" field under "Templates/Thesauri Item" template, edit that field and set:
After updating the field you'll have to fully reindex the core to get solr records updated:
../bin/solr_reindex_core.php -c
Best regards
Thanks for the quick response.
I still have further issues.
I have made the changes as suggested, here's what I did:
Here's the missing Order label, it shows an empty field where I can input the order:
Is there any further configs I need to change?
Thanks, Rafa.
Ok, I see the problem, check first screenshot. There are no titles set for English and Spanish languages. Find the same order field, edit and add values for Title (en), Title (es). Save and reload browser page.
Ill check if in barebone core these titles are set.
Thanks, that solved the label issue.
Any idea how to approach the other issue? I need to re-save every item in order for it to get 'listed' as an ordered field? Is there another way to reindex the core?
Thanks again.
did reindex script give any result ? here is how I execute it from shell (under windows): d:\devel\www\casebox\bin>php solr_reindex_core.php -c test -a -l
2015-07-17 17:30:46 Processing core test ... updating tree optimizing
Note: "test" is name of the core (without prefix).
Yep, gives that exact result: updating tree and optimizing (I replaced the test core name with my own as expected), but the items don't get an order inside solr until I re-save them inside casebox.
As soon as a I change something and re-save the item, the order field appears as expected under SOLR.
Sorry, I've forgot about solr prepared data. You have to update it before reindex core: d:\devel\www\casebox\bin>php update_solr_prepared_data.php -c test -a Total objects: 54
Done
and then reindex solr
Great! Thanks, that did it. No need to re-save every item now.
Thanks for the feedback, time, and staying behind us during development.
Best regards, Rafa.
Problem
When I create an Objects type field pointing to a thesauri folder with several items inside, they get ordered only alphabetically.
Is there a way to configure the field so that the items are sorted by the 'order' data field, which is correctly configured?
Way to reproduce
Extra info
This issue also happens if I use the
method, in which there is no way of ordering the fields or to actually know the data order. We could sort them out ourselves if that data property would be returned by the method.
Thanks in advance, Rafa.