I based this on Library::FilterArtworks(), but this one will have higher traffic, so I'd appreciate the extra attention. I've included sample queries below of the different SQL that different searches and sort orders will generate. If you'd like me to try a certain case, send me an /ebooks link, e.g.,
I based this on
Library::FilterArtworks()
, but this one will have higher traffic, so I'd appreciate the extra attention. I've included sample queries below of the different SQL that different searches and sort orders will generate. If you'd like me to try a certain case, send me an /ebooks link, e.g.,https://standardebooks.org/ebooks?page=2&query=boy&sort=reading-ease&tags%5B0%5D=fiction
and I'll provide the corresponding query.
You don't have to go through each case below. I think they look reasonable—especially the default—and performance is good on my machine.
Default for /ebooks, no tags, empty query, and sorted by release date
Query for "spain"
Empty query, sorted by length, no index on WordCount, but I think that's ok
"Memoir" tag selected, sort by author name
Multiple tags selected, sort by author name
Everything: Multiple tags selected, sort by author name, query for "nature"