Predictive Search

Broken link? Feature request? Anything related to the Spectrum Computing website here.
User avatar
PeterJ
Site Admin
Posts: 6855
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Predictive Search

Post by PeterJ »

Rui Martins [mention]RMartins[/mention] has developed a predictive search for the home page. You can access it by going to the following page:

https://spectrumcomputing.co.uk/index_new.php

If you struggle to get it to work please clear your browser cache.

Image

Please have a good play with it and let us know what you think. As this is a test page, if you use the browser back button from a search results screen it will take you back to the normal home page. Just go back to the link above to try it again.

I'm grateful to [mention]RMartins[/mention] for his work on this.
User avatar
Juan F. Ramirez
Bugaboo
Posts: 5102
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Predictive Search

Post by Juan F. Ramirez »

A really good idea.

I'm using Chrome for Android and it works. But it's a bit slow, though.

It seems it needs a minimum of three characters. Am I wright?

I'm trying:


Sir Fre

Sir Fred

but it doesn't work.
Last edited by Juan F. Ramirez on Mon Jul 15, 2019 9:54 pm, edited 2 times in total.
User avatar
PeterJ
Site Admin
Posts: 6855
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Predictive Search

Post by PeterJ »

Juan F. Ramirez wrote: Mon Jul 15, 2019 9:46 pm A really good idea.

I'm using Chrome for Android and it works.
Thanks for the feedback. Could you test it on a desktop or laptop for now?
User avatar
Juan F. Ramirez
Bugaboo
Posts: 5102
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Predictive Search

Post by Juan F. Ramirez »

Yes I'll try it
User avatar
PeterJ
Site Admin
Posts: 6855
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Predictive Search

Post by PeterJ »

Yes [mention]Juan F. Ramirez[/mention]

Three characters.
User avatar
Juan F. Ramirez
Bugaboo
Posts: 5102
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Predictive Search

Post by Juan F. Ramirez »

PeterJ wrote: Mon Jul 15, 2019 9:55 pm Yes @Juan F. Ramirez

Three characters.
The case of Sir Fred is weird... it doesn't work, as I said before...
User avatar
Juan F. Ramirez
Bugaboo
Posts: 5102
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Predictive Search

Post by Juan F. Ramirez »

Now I'm with my laptop (Windows 10).

Both in Chrome and Edge (cleaned cache before) I made a search for

'Underw'

and the result was

'Wunderwaffe'. Underwurlde was ignored.

The same problem with Sir Fred.

And If I type

'Green'

only 'An Walgreen' appears. It ignored the obvious Green Beret.

Hope it helps!
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Predictive Search

Post by R-Tape »

I'm using IE, W10 laptop, and I cleared cookies.

If I type "Buzz" then I see a list that contains the Buzzsaw variants among others, but if I continue and quickly type "Buzzsaw" & press enter it selects "Buzzman". It looks like the speed you type matters, when you press enter it selects the top choice for you—I would not want it to do that. I'd want the option to search for the string that I input, irrespective of whether it's in the list.

If I type "buzz", then I don't see a list at all, but it does at least let me type "buzzsaw" and search for it. The first letter needs to be upper case for the search to work. Is that intentional?
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins »

Juan F. Ramirez wrote: Mon Jul 15, 2019 10:13 pm Now I'm with my laptop (Windows 10).

Both in Chrome and Edge (cleaned cache before) I made a search for

'Underw'

and the result was

'Wunderwaffe'. Underwurlde was ignored.

The same problem with Sir Fred.

And If I type

'Green'

only 'An Walgreen' appears. It ignored the obvious Green Beret.

Hope it helps!
Currently Title search is case sensitive (will be changed).

Juan F. Ramirez wrote: Mon Jul 15, 2019 9:46 pm ...
I'm using Chrome for Android and it works. But it's a bit slow, though.

It seems it needs a minimum of three characters. Am I wright?
...
It's not slow, it just waits a bit for the user to stop typing (500 ms), and then it will do a quick Search.
The standard time to wait is usually around 300 ms, but since is going on testing and to minimize server load, since there might be slow typists around here, for now it's set at 500ms. :lol:

Yes, to minimize server searches, a minimum of 3 characters is required.
NOTE: this was debated in a previous thread, where there was a special case for "3D" for example. There are some plans to improve search, in several regards.


There is also issues with search with numeral numbers like "II" versus "2", for example, because I'm not using the search_by_titles table yet.
This will be addressed shortly.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins »

R-Tape wrote: Mon Jul 15, 2019 10:16 pm I'm using IE, W10 laptop, and I cleared cookies.

If I type "Buzz" then I see a list that contains the Buzzsaw variants among others, but if I continue and quickly type "Buzzsaw" & press enter it selects "Buzzman". It looks like the speed you type matters, when you press enter it selects the top choice for you—I would not want it to do that. I'd want the option to search for the string that I input, irrespective of whether it's in the list.
You most probably typed enter, after a list was provided, hence the first item was selected.

I intend to change the behaviour, so that it will only select an item, if we physically select an item, instead of defaulting to the first one on enter.
R-Tape wrote: Mon Jul 15, 2019 10:16 pm If I type "buzz", then I don't see a list at all, but it does at least let me type "buzzsaw" and search for it. The first letter needs to be upper case for the search to work. Is that intentional?
That's because currently it's case sensitive, and there is nothing with "buzz" with a lower B.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins »

RMartins wrote: Tue Jul 16, 2019 10:56 am ...
I intend to change the behaviour, so that it will only select an item, if we physically select an item, instead of defaulting to the first one on enter.
...
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.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: Predictive Search

Post by hikoki »

It doesn't work on Safari version 9.0.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: Predictive Search

Post by hikoki »

hikoki wrote: Wed Jul 17, 2019 3:52 am It doesn't work on Safari version 9.0.
It works only that just on the right top search box. Nice addition
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: Predictive Search

Post by ZXDunny »

Doesn't work at all here, Win10, Chrome latest. Deleted cookies, still nothing.
User avatar
PeterJ
Site Admin
Posts: 6855
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Predictive Search

Post by PeterJ »

hikoki wrote: Wed Jul 17, 2019 6:22 am
hikoki wrote: Wed Jul 17, 2019 3:52 am It doesn't work on Safari version 9.0.
It works only that just on the right top search box. Nice addition
Correct. As per the first post, it's just the quick search. Does that work on Safari?
User avatar
PeterJ
Site Admin
Posts: 6855
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Predictive Search

Post by PeterJ »

ZXDunny wrote: Wed Jul 17, 2019 10:18 am Doesn't work at all here, Win10, Chrome latest. Deleted cookies, still nothing.
I had to CTRL + F5 then reboot on W10.
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: Predictive Search

Post by ZXDunny »

PeterJ wrote: Wed Jul 17, 2019 10:39 am
ZXDunny wrote: Wed Jul 17, 2019 10:18 am Doesn't work at all here, Win10, Chrome latest. Deleted cookies, still nothing.
I had to CTRL + F5 then reboot on W10.
No effect here, I've cleared cookies, refreshed hard with CTRL+F5 and rebooted Win10.

Still no predictive search.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins »

NOTE: The only place where it's implemented right now, is on the quick search box. Top right corner.

I a bit confused, about the rest.

Doesn't run on Safari 9.0 ?
I'll check that.

Doesn't run on Chrome on Win10 ?
I checked Chrome, and it works, but you have to clear your cache, because the javascript file is being cached.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins »

ZXDunny wrote: Wed Jul 17, 2019 11:22 am
PeterJ wrote: Wed Jul 17, 2019 10:39 am I had to CTRL + F5 then reboot on W10.
No effect here, I've cleared cookies, refreshed hard with CTRL+F5 and rebooted Win10.

Still no predictive search.
Did you notice that you need to use a different URL ?
https://spectrumcomputing.co.uk/index_new.php
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins »

RMartins wrote: Wed Jul 17, 2019 11:40 am Doesn't run on Safari 9.0 ?
I'll check that.
Just confirmed that it works, On Safari 12.1.1, if using the correct URL.
https://spectrumcomputing.co.uk/index_new.php

Anyone else, having issues?
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: Predictive Search

Post by ZXDunny »

RMartins wrote: Wed Jul 17, 2019 11:42 am
ZXDunny wrote: Wed Jul 17, 2019 11:22 am No effect here, I've cleared cookies, refreshed hard with CTRL+F5 and rebooted Win10.

Still no predictive search.
Did you notice that you need to use a different URL ?
https://spectrumcomputing.co.uk/index_new.php
Aha! That was the problem - I was just clicking on the banner at the top of the forum :)

Feel a bit of a pratt now!
User avatar
PeterJ
Site Admin
Posts: 6855
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Predictive Search

Post by PeterJ »

No worries [mention]ZXDunny[/mention]

Just glad you are now able to test.
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: Predictive Search

Post by ZXDunny »

Yeah, it works. It's a bit weird typing in "Cyb" and getting results that have "cyb" somewhere inside them, rather than starting with it. We may need to add in some modifiers for the user to specify where the results need to match.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins »

ZXDunny wrote: Wed Jul 17, 2019 2:30 pm Yeah, it works. It's a bit weird typing in "Cyb" and getting results that have "cyb" somewhere inside them, rather than starting with it. We may need to add in some modifiers for the user to specify where the results need to match.
That's the current behaviour, of the search_by tables.

"Search" is a big subject. I know because I was responsible (tech lead) for web platform of "Yellow Pages" in my country, for about 3 years.
Doing search properly, requires a very different approach than using SQL and is something that takes constant effort to maintain.

Here the approach being followed, is to have the best we can just using SQL, so some limitations apply, but we will try to improve whenever we can.

Some things still need to be debated, taking into account, what features we would like to have and what can be done with an SQL only solution.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins »

To the ones, that keep an eye on the Tab Icons, there is a proposal for a new one on this new page.

It was based on the site Logo, but its design was adapted to fit the size restrictions of a favicon.
Previous favicon was just a rescale of the site logo, and becomes unreadable and blurry at smaller versions.

NOTE: It might not show up on every browser, since there are a lot of settings for the favicon, and several formats, so some might still be missing.
Post Reply