Page 1 of 2

Predictive Search

Posted: Mon Jul 15, 2019 9:37 pm
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.

Re: Predictive Search

Posted: Mon Jul 15, 2019 9:46 pm
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.

Re: Predictive Search

Posted: Mon Jul 15, 2019 9:50 pm
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?

Re: Predictive Search

Posted: Mon Jul 15, 2019 9:54 pm
by Juan F. Ramirez
Yes I'll try it

Re: Predictive Search

Posted: Mon Jul 15, 2019 9:55 pm
by PeterJ
Yes [mention]Juan F. Ramirez[/mention]

Three characters.

Re: Predictive Search

Posted: Mon Jul 15, 2019 9:56 pm
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...

Re: Predictive Search

Posted: Mon Jul 15, 2019 10:13 pm
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!

Re: Predictive Search

Posted: Mon Jul 15, 2019 10:16 pm
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?

Re: Predictive Search

Posted: Tue Jul 16, 2019 10:52 am
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.

Re: Predictive Search

Posted: Tue Jul 16, 2019 10:56 am
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.

Re: Predictive Search

Posted: Tue Jul 16, 2019 3:09 pm
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.

Re: Predictive Search

Posted: Wed Jul 17, 2019 3:52 am
by hikoki
It doesn't work on Safari version 9.0.

Re: Predictive Search

Posted: Wed Jul 17, 2019 6:22 am
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

Re: Predictive Search

Posted: Wed Jul 17, 2019 10:18 am
by ZXDunny
Doesn't work at all here, Win10, Chrome latest. Deleted cookies, still nothing.

Re: Predictive Search

Posted: Wed Jul 17, 2019 10:38 am
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?

Re: Predictive Search

Posted: Wed Jul 17, 2019 10:39 am
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.

Re: Predictive Search

Posted: Wed Jul 17, 2019 11:22 am
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.

Re: Predictive Search

Posted: Wed Jul 17, 2019 11:40 am
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.

Re: Predictive Search

Posted: Wed Jul 17, 2019 11:42 am
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

Re: Predictive Search

Posted: Wed Jul 17, 2019 11:45 am
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?

Re: Predictive Search

Posted: Wed Jul 17, 2019 12:25 pm
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!

Re: Predictive Search

Posted: Wed Jul 17, 2019 1:39 pm
by PeterJ
No worries [mention]ZXDunny[/mention]

Just glad you are now able to test.

Re: Predictive Search

Posted: Wed Jul 17, 2019 2:30 pm
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.

Re: Predictive Search

Posted: Wed Jul 17, 2019 2:41 pm
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.

Re: Predictive Search

Posted: Wed Jul 17, 2019 10:42 pm
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.