Predictive Search

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

Predictive Search

Post by PeterJ » Mon Jul 15, 2019 8:37 pm

Rui Martins @RMartins 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 @RMartins for his work on this.
2 x

User avatar
Juan F. Ramirez
Rick Dangerous
Posts: 2022
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Predictive Search

Post by Juan F. Ramirez » Mon Jul 15, 2019 8:46 pm

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 8:54 pm, edited 2 times in total.
0 x

User avatar
PeterJ
Site Admin
Posts: 1307
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Predictive Search

Post by PeterJ » Mon Jul 15, 2019 8:50 pm

Juan F. Ramirez wrote:
Mon Jul 15, 2019 8: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?
0 x

User avatar
Juan F. Ramirez
Rick Dangerous
Posts: 2022
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Predictive Search

Post by Juan F. Ramirez » Mon Jul 15, 2019 8:54 pm

Yes I'll try it
0 x

User avatar
PeterJ
Site Admin
Posts: 1307
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Predictive Search

Post by PeterJ » Mon Jul 15, 2019 8:55 pm

Yes @Juan F. Ramirez

Three characters.
0 x

User avatar
Juan F. Ramirez
Rick Dangerous
Posts: 2022
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Predictive Search

Post by Juan F. Ramirez » Mon Jul 15, 2019 8:56 pm

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

Three characters.
The case of Sir Fred is weird... it doesn't work, as I said before...
0 x

User avatar
Juan F. Ramirez
Rick Dangerous
Posts: 2022
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Predictive Search

Post by Juan F. Ramirez » Mon Jul 15, 2019 9: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!
0 x

User avatar
R-Tape
Site Admin
Posts: 2525
Joined: Thu Nov 09, 2017 11:46 am

Re: Predictive Search

Post by R-Tape » Mon Jul 15, 2019 9: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.

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?
0 x

User avatar
RMartins
Manic Miner
Posts: 391
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins » Tue Jul 16, 2019 9:52 am

Juan F. Ramirez wrote:
Mon Jul 15, 2019 9: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 8: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.
1 x

User avatar
RMartins
Manic Miner
Posts: 391
Joined: Thu Nov 16, 2017 3:26 pm

Re: Predictive Search

Post by RMartins » Tue Jul 16, 2019 9:56 am

R-Tape wrote:
Mon Jul 15, 2019 9: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 9: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.
0 x

Post Reply