This behaviour was changed, it no longer auto focus to the list.
NOTE: Be sure to force a refresh (CTRL+5 on windows, CMD+Shift+R on MAC), to get the updated Javascript files.
This behaviour was changed, it no longer auto focus to the list.
Correct. As per the first post, it's just the quick search. Does that work on Safari?
I had to CTRL + F5 then reboot on W10.
No effect here, I've cleared cookies, refreshed hard with CTRL+F5 and rebooted Win10.
Just confirmed that it works, On Safari 12.1.1, if using the correct URL.
Aha! That was the problem - I was just clicking on the banner at the top of the forumRMartins wrote: ↑Wed Jul 17, 2019 11:42 amDid you notice that you need to use a different URL ?
https://spectrumcomputing.co.uk/index_new.php
That's the current behaviour, of the search_by tables.
The motivation is that users searching for either "Knight Lore" or "Knightlore" will work in both cases. Searching for either "Chop Lifter" or "Choplifter" will also work in both cases. Incidentally the exact spellings are "Knight Lore" and "Choplifter", but nobody needs to know that.
And I have nothing against that.Einar Saukas wrote: ↑Thu Jul 18, 2019 3:37 pmThe motivation is that users searching for either "Knight Lore" or "Knightlore" will work in both cases. Searching for either "Chop Lifter" or "Choplifter" will also work in both cases. Incidentally the exact spellings are "Knight Lore" and "Choplifter", but nobody needs to know that.
I also do not have anything against that.Einar Saukas wrote: ↑Thu Jul 18, 2019 3:37 pm Ignoring special characters has the same motivation. Otherwise nobody would ever find "Cadàveriön". And it has to work both ways, otherwise searching for proper spellings like "iniciación" would not find anything, because most foreign titles imported from Martijn's WoS were missing accentuation (we are gradually fixing it but it's going to take some time).
What I'm proposing, is that we can in fact use the same system, and we probably should.Einar Saukas wrote: ↑Thu Jul 18, 2019 3:37 pm Thus basically "search_by" tables were created to help searches work as good as possible. They were never intended to help autocomplete, and I doubt there's a single solution that would work for both. You may need to create your own auxiliary tables for that.
You probably don't need to distinguish between authors and publishers.
Code: Select all
SELECT name FROM labels WHERE id IN
(SELECT label_id FROM search_by_authors)
Code: Select all
SELECT name FROM labels WHERE id IN
(SELECT label_id FROM search_by_publishers)
Code: Select all
SELECT title FROM entries
UNION ALL SELECT title FROM aliases
Code: Select all
SELECT title AS text FROM entries
UNION ALL SELECT title AS text FROM aliases
UNION ALL SELECT name AS text FROM labels
I agree, except with the last sentenceEinar Saukas wrote: ↑Thu Jul 18, 2019 8:48 pm Sure, I understand your ideas. They are quite similar to my considerations when I created these tables about a year ago. But I still don't see how they could be improved.
I don't really need to store text in these tables as lowercase only, since all comparisons use "ci" collation. Everything is currently converted to lowercase just to reduce unnecessary duplicates. Also collation is currently defined in these tables just for convenience, so site owners don't need to remember to specify collation in their queries. Changing these details wouldn't improve searches or help autocomplete.
Punctuation in data is not required to be removed, for similar reasons as case (being possible to match it, if needed).Einar Saukas wrote: ↑Thu Jul 18, 2019 8:48 pm Moreover, I still think it's a good idea to remove spaces and punctuation from these tables, otherwise users searching for either "Offroad Racing" or "Off Road Racing" wouldn't find anything.
Neither am I, because search is a huge subject, with many considerations and p´ros and cons, like any engineering solution, sometimes compromises need to be done.Einar Saukas wrote: ↑Thu Jul 18, 2019 8:48 pm Admittedly I'm not an expert in this area so I could be wrong. If you have any changes to suggest, please go ahead!
Currently the Quick search is using this query:Einar Saukas wrote: ↑Thu Jul 18, 2019 9:07 pmYou probably don't need to distinguish between authors and publishers.
...
Code: Select all
SELECT N.name
FROM(
(
SELECT E.title AS name
FROM entries E INNER JOIN search_by_titles SBT ON (SBT.entry_id = E.id)
WHERE SBT.entry_title LIKE ?
ORDER BY E.title
LIMIT 10
)
UNION
(
SELECT A.title AS name
FROM aliases A
WHERE A.title LIKE ?
ORDER BY A.title
LIMIT 10
)
UNION
(
SELECT L.name AS name
FROM labels L INNER JOIN search_by_authors SBA ON (SBA.label_id = L.id)
WHERE L.name LIKE ?
ORDER BY L.name
LIMIT 10
)
UNION
(
SELECT L.name AS name
FROM labels L INNER JOIN search_by_publishers SBP ON (SBP.label_id = L.id)
WHERE L.name LIKE ?
ORDER BY L.name
LIMIT 10
)) N
ORDER BY N.name
LIMIT 10
Not sure I understood what you meant.Einar Saukas wrote: ↑Thu Jul 18, 2019 9:07 pm This way, it's also easy to impose a limit of 40 results overall, instead of partial limits of 10 each.
Code: Select all
SELECT E.title AS name
FROM entries E INNER JOIN search_by_titles SBT ON (SBT.entry_id = E.id)
WHERE SBT.entry_title LIKE ?
ORDER BY E.title
LIMIT 10
Code: Select all
SELECT E.title AS name
FROM entries E INNER JOIN search_by_titles SBT ON (SBT.entry_id = E.id)
WHERE SBT.entry_title LIKE ? COLLATE utf8mb4_unicode_as_ci
ORDER BY E.title
LIMIT 10
Code: Select all
SHOW COLLATION WHERE Charset = 'utf8mb4';