Forums
/
Feature Request
/ [ ] Forum Search
[ ] Forum Search
Kevin · 16 replies
[ ] Forum Search
Kevin
1 year ago
Nov 24, 2023 - 9:07am
I’ve been knocked out for the last few weeks as I seem to blow out my back with more and more regularity these days. While laid out, I did put together a forum search mechanism. A few things to note:
This is not as sophisticated as the standard search. That is using a 3rd party application to handle all the edge cases, diacritical characters, mispellings etc. I spend a week trying to force the forums into that app only to find that it quickly ran me into storage use charges (forum posts are long) that became unreasonable expensive very quickly.
Instead this is a simple string search that tries and finds the search query inside of posts. Also it is case sensitive (as the entire database is) so a search on 'Evidence' is different from 'evidence'. At this time, I can’t make it any more advanced than that. I’m looking into a different search service that can handle both the standard search as well as forum search but that takes even more time to research and implement.
For now hopefully you guys will find this basic search useful.
Kevin
This is not as sophisticated as the standard search. That is using a 3rd party application to handle all the edge cases, diacritical characters, mispellings etc. I spend a week trying to force the forums into that app only to find that it quickly ran me into storage use charges (forum posts are long) that became unreasonable expensive very quickly.
Instead this is a simple string search that tries and finds the search query inside of posts. Also it is case sensitive (as the entire database is) so a search on 'Evidence' is different from 'evidence'. At this time, I can’t make it any more advanced than that. I’m looking into a different search service that can handle both the standard search as well as forum search but that takes even more time to research and implement.
For now hopefully you guys will find this basic search useful.
Kevin
···
bgzimmer
11 months ago
Nov 28, 2023 - 9:04am
Thanks for this, seems to work just fine! One small suggestion... When the results are returned, it would be more helpful for the top of the page to give the total number of forum posts with the search string, rather than the number of posts on a single results page (which only goes up to 30).
Done
Kevin
11 months ago
Nov 29, 2023 - 11:06am
You got it!
Kevin
Kevin
···
bgzimmer
11 months ago
Nov 30, 2023 - 1:36am
Fabulous. Doing some searches, I came across this thread from *18 years ago* where we're talking about problems with some features on the old site (including forum search!) relating to the newly released Firefox 1.5. I'm now using Firefox... 120.0.
[bandtoband.com] https://bandtoband.com/forums/complete-shambles/sidebar-broken-in-firefox-15-109...
[bandtoband.com] https://bandtoband.com/forums/complete-shambles/sidebar-broken-in-firefox-15-109...
···
Bloopy
11 months ago
Dec 1, 2023 - 10:48pm
I get a 500 server error when searching for Joan Jett
Also, to help with the case sensitivity somewhat, is it possible to make every forum search do 2-3 searches and then combine the results? I'm thinking something like the following:
a.) The search exactly as entered, eg.: and the Wailers
b.) A search with the 1st letter of every word capitalised, eg.: And The Wailers
c.) A search in lowercase, eg.: and the wailers
In this example, a.) returns 5 Wiki World results, b.) returns 7 results from various sections, and c.) returns a result from a different Wiki World thread, so they could combine to give 13 results. Any duplicate post IDs could also be eliminated.
In most cases the search we enter will already be lowercase so c.) can be skipped. Or if the search we enter is a name with every word capitalised then b.) can be skipped.
Also, to help with the case sensitivity somewhat, is it possible to make every forum search do 2-3 searches and then combine the results? I'm thinking something like the following:
a.) The search exactly as entered, eg.: and the Wailers
b.) A search with the 1st letter of every word capitalised, eg.: And The Wailers
c.) A search in lowercase, eg.: and the wailers
In this example, a.) returns 5 Wiki World results, b.) returns 7 results from various sections, and c.) returns a result from a different Wiki World thread, so they could combine to give 13 results. Any duplicate post IDs could also be eliminated.
In most cases the search we enter will already be lowercase so c.) can be skipped. Or if the search we enter is a name with every word capitalised then b.) can be skipped.
···
pin_punk
11 months ago
Dec 2, 2023 - 4:35am
Forum search isn't working for me at all on mobile - could it be the same issue as with the other search?
Joan
Kevin
11 months ago
Dec 4, 2023 - 1:37pm
I've fixed the Joan Jett error. The search was matching against deleted posts from way, way back that weren't expunged from the database (old forum software) and were failing upon initialization. I've stopped the search from matching against those.
I'll try and tackle the other listed issues next.
Kevin
I'll try and tackle the other listed issues next.
Kevin
Mobile
Kevin
11 months ago
Dec 4, 2023 - 3:06pm
Forum searches are working for me on mobile (now) although the formatting is trash as long links are wrecking the width. Can someone confirm that mobile is working for them as well?
Good point on case sensitive searches. It shouldn't be a huge lift to do multiple ones on different capitalization schemes as forum searches are local, as opposed to the 3rd party service, and not frequent so it won't risk taking the server down. I'll try to get some of those inplace.
Kevin
Good point on case sensitive searches. It shouldn't be a huge lift to do multiple ones on different capitalization schemes as forum searches are local, as opposed to the 3rd party service, and not frequent so it won't risk taking the server down. I'll try to get some of those inplace.
Kevin
···
Ruiter
11 months ago
Dec 4, 2023 - 10:49pm
It works, although it’s still case sensitive. For example, “Mark lanegan” has no results, you have to type “Mark Lanegan”.
···
pin_punk
11 months ago
Dec 5, 2023 - 5:46am
I'm still getting nothing on Chrome on mobile.
Capitalizations
Kevin
11 months ago
Dec 6, 2023 - 1:16pm
I've merged multiple capitalization options as suggested by bloopy above such that searches are not necessarily case insentive any more.
"Alice Cooper" will now match on:
Alice Cooper
Alice cooper
alice Cooper
alice cooper
That should hopefully improve the quality of the search results.
Furthermore, I've also truncated long URL's at appear on small screens and wreck the layout. They'll still display as normal on large monitors but on Album Notes, Forum Posts, and (slightly differently formatted) in Forum search results.
Now I have to figure out the issue with mobile forum search not working at all...
Kevin
"Alice Cooper" will now match on:
Alice Cooper
Alice cooper
alice Cooper
alice cooper
That should hopefully improve the quality of the search results.
Furthermore, I've also truncated long URL's at appear on small screens and wreck the layout. They'll still display as normal on large monitors but on Album Notes, Forum Posts, and (slightly differently formatted) in Forum search results.
Now I have to figure out the issue with mobile forum search not working at all...
Kevin
···
Bloopy
11 months ago
Dec 7, 2023 - 5:10am
Results look great now, capitalisation-wise.
Seems it doesn't do anything for me on Chrome mobile either.
Seems it doesn't do anything for me on Chrome mobile either.
OS?
Kevin
11 months ago
Dec 8, 2023 - 12:25pm
I just pulled up Chrome on my iPhone and was able to do forum searches just fine? What kind of phone are you guys using? I'm guessing it might have something to do with submitting the form and I could use a submit button on mobile devices just to be sure it works.
Kevin
Kevin
···
Bloopy
11 months ago
Dec 8, 2023 - 5:33pm
Android here. Mine's a Sharp so I don't currently have a 2nd built-in browser like some brands do.
I do have developer tools/debugging enabled, so in theory I could plug my phone into my laptop at some point and see if I can see any errors in the Chrome developer console. I'm surprised it's so much more difficult to access that than on desktop.
I do have developer tools/debugging enabled, so in theory I could plug my phone into my laptop at some point and see if I can see any errors in the Chrome developer console. I'm surprised it's so much more difficult to access that than on desktop.
···
pin_punk
11 months ago
Dec 9, 2023 - 1:14am
Android too. I'm on an old Huawei.
Button
Kevin
11 months ago
Dec 10, 2023 - 9:39pm
I've added a submit button for small screens for forum searches, and a submit button for all size screens on the search page (used on mobile):
[bandtoband.com] https://bandtoband.com/search
Let me know if this solves your issues.
Kevin
[bandtoband.com] https://bandtoband.com/search
Let me know if this solves your issues.
Kevin
© BandToBand.com
Mapping the Rock 'N Roll genome since 2005