Sort order of images found by tag search

How is the default sort order set for images found by a tag search? E.g. galleries/page/search/tags/searchitem . I'd like images to be sorted by title, e.g.

Comments

  • The default for a search is the gallery sort order.
  • Thank you.
  • Is the statement above documented as fact or is there a bug?

    I asked the same question in a different post and was given a different answer than the poster above.

    My testing of approved themes does not show that searches can be sorted by the gallery order. Or by the custom options offered in gallery sort order.

    I tried "filename,date" or "date,filename" as parameters for gallery sort, but it seemed to have no effect at all on the the search returned.

    Actually....when I use custom sort "date,filename" I get a MySQL error when I initiate a search.
  • acrylian Administrator, Developer
    This topic is very old from a time the search engine was in its early state.

    As noted on the other topic: Search order is by relevance (you don't expect another order for results, do you?). If you wish another you need to do that in the loops on your theme directly.

    The only "search" results you can sort via the backend are dynamic albums (=saved searches).
  • Same Problem here,
    i'm trying to sort my results in my search.php

    $sorttype = 'title';
    $sortdirection = "asc";
    while (next_album(true, $sorttype, $sortdirection)):
    ...

    But whatever value i use for $sorttype it does not change the order.
    Same code is working flawless on my index/album.php.

    Ideas? Is it a bug? There has to be a way to order the results. I'm using tags as a part of the navigation, so ordering by relevance does not make sense here.
  • Yes, it is a bug.
  • Well okay.
    finally i did a workaround by collecting and sorting the albums in an array.
    So do i have to open a ticket or something for this bug??

    Thanks for your reply!
  • Ideally you would open a ticket so the fix could be tracked. But since the fix is now in the support build there is no need.
Sign In or Register to comment.