Metal Storm logo
New search functionality



Posts: 42   Visited by: 120 users
10.02.2024 - 00:29
corrupt
With a lowercase c
Admin
I just pushed a little update to the site search.

It's not the full-blown autocomplete with images and all, that I'm envisioning, but while working on these controls, I got to a conveniently working state. So I figured, I'd just push it and get some feedback.

The site search box will now autocomplete band, album, and user names as well as genres, and lead directly to the respective result if autocompletion is used. You will only be sent to the usual old search pages when you search for something that doesn't autocomplete or something that autocompletion won't find (like words not at the beginning of album or band names).

It will also remember your last used search selection for a while, before returning to "band".

Matching is done via proper collation, so you should find bands like Mgła or Sólstafir with whatever you have available on your keyboard. For bands with more esoteric names like ██████, it will also match the also known as field.

And since that was by far the most frequent thing I was asked since taking over: yes, it will match be'lakor as well.

Please play around with it at your own convenience and post your feedback here, if you have any
----
Loading...
10.02.2024 - 01:36
VileVick-Bryant
That's cool
Loading...
10.02.2024 - 01:41
F3ynman2000
Nocturnal Bro
Contributor
Yes! This is a great addition to the site
Loading...
10.02.2024 - 04:20
24emd
Theory Snob
Yeah this is just awesome, thanks so much. Probably the thing I was most hoping for an improvement on
----
"I am too stupid to be human, and I lack common sense." - Proverbs 30:2
"Music? Well, it's just entertainment, folks!" - Devin Townsend

Best 2024 Albums
Loading...
10.02.2024 - 04:39
Vellichor
You’ve raised our search feature to PornHub standards 🙏
Loading...
10.02.2024 - 06:01
VileVick-Bryant
Written by Vellichor on 10.02.2024 at 04:39

You’ve raised our search feature to PornHub standards 🙏


To be far a few other sites does this like Album Of the Year. RYM needs this.
Loading...
10.02.2024 - 09:43
nikarg
Staff
Written by Vellichor on 10.02.2024 at 04:39

You’ve raised our search feature to PornHub standards 🙏

For my very first search with the new feature, I just put "ge" without having any band in mind whatsoever, and look at what came up first:



Great work, corrupt, I love this.
Loading...
10.02.2024 - 11:02
VileVick-Bryant
Written by nikarg on 10.02.2024 at 09:43

Written by Vellichor on 10.02.2024 at 04:39

You’ve raised our search feature to PornHub standards 🙏

For my very first search with the new feature, I just put "ge" without having any band in mind whatsoever, and look at what came up first:



Great work, corrupt, I love this.


I bet it's a grindcore band
Loading...
10.02.2024 - 12:22
Bad English
Tage Westerlund
Wow good job, and also news whit visible and invisible bands are cool to.
----
I stand whit Ukraine and Israel. They have right to defend own citizens.

Stormtroopers of Death - ''Speak English or Die''
apos;'
[image]
I better die, because I never will learn speek english, so I choose dieing
Loading...
10.02.2024 - 13:28
Vellichor
Yeah this is awesome, thanks so much!
Loading...
10.02.2024 - 14:13
LordFezzington
Lost To Apathy
Excellent little feature
----
"Pay no heed to anyone and do what seems right to yourself." - Franz Kafka, The Trial
2022 List: https://metalstorm.net/users/list.php?list_id=7001
2021 List: https://metalstorm.net/users/list.php?list_id=6742
Loading...
06.03.2024 - 02:23
F3ynman2000
Nocturnal Bro
Contributor
Some feedback: suggestions only pop up according to the first word in the search. However, it would be nice to also have it apply to any string in the band name for band names made of multiple words. For example, for "maiden", Iron Maiden doesn't show up as a suggestion.
Loading...
06.03.2024 - 11:02
corrupt
With a lowercase c
Admin
Written by F3ynman2000 on 06.03.2024 at 02:23
Some feedback: suggestions only pop up according to the first word in the search. However, it would be nice to also have it apply to any string in the band name for band names made of multiple words. For example, for "maiden", Iron Maiden doesn't show up as a suggestion.

Hey, yeah, that would be nice. The reason I haven't done that yet is mostly performance. I need search to be fast to take load off the database and token search on just database indexes has terrible performance. I am experimenting with things internally, but no promises ^

Edit: just to give an idea:
Search as it is with matching at the beginning of a band name: 0.00056s per query.
Search that matches anywhere in a band name: 0.054s per query.

These numbers come from my local setup running on less ram than the server database, but it's only the order of magnitude I want to draw attention to.
That obviously comes with higher database load. We have over 100 search queries per minute, sometimes over a thousand, and one query is issued for any letter you type. With the resources we have, I need to pay careful attention not to blow an individual feature up in CPU or RAM usage to avoid stalling the database.
----
Loading...
06.03.2024 - 14:20
F3ynman2000
Nocturnal Bro
Contributor
^ Ok thanks for the clarification
Loading...
08.03.2024 - 00:57
corrupt
With a lowercase c
Admin
Next iteration with a proper template engine, allowing me to display more information. I guess most of you will have discovered the new features before discovering this post

There's also a loading indicator now for when the page loads slowly so it is obvious that something is happening. I guess that's mostly a feature for mobile users.

Obviously there's a chance I broke something as usual. But this time I'm open to feedback not just about the feature in general but layout, what information you would like to see, etc..

edit: I'm aware that the search box doesn't display country flags using the same font as band profiles yet, but uses OS/browser-specific fonts. I'm investigating that. This is fixed now.
----
Loading...
08.03.2024 - 01:38
F3ynman2000
Nocturnal Bro
Contributor
^ looks really cool!
Loading...
08.03.2024 - 04:06
Guib
Thrash Talker
Man that new update on the search is really cool. Thanks corrupt.
----
- Headbanging with mostly clogged arteries to that stuff -
Guib's List Of Essential Albums
- Also Thrash Paradise
Thrash Here
Loading...
09.03.2024 - 14:30
corrupt
With a lowercase c
Admin
Written by F3ynman2000 on 06.03.2024 at 02:23
Some feedback: suggestions only pop up according to the first word in the search. However, it would be nice to also have it apply to any string in the band name for band names made of multiple words. For example, for "maiden", Iron Maiden doesn't show up as a suggestion.

Ok, this didn't leave me any peace because I agree. I picked up an experiment with fulltext indexes I had abandoned a few months ago and implemented a version of this. It's slower than before but within reasonable limits I think.

So while you can search for "maid" now and it will match Iron Maiden, I need to figure out how to sort the results now

If you (or anyone else) has some input here, I'm really open to hear it. Let me quickly explain how it's done now.

The query looks for word boundaries now, meaning it'll match the beginning of each word in a band's name and its "also known as" field.

I'm currently sorting in this order:

1. band names that start with the search term (e.g. "iro" for Iron Maiden)
2. band names having a word that is not the first one start with the search term (e.g. "maid" for Iron Maiden)
3. a.k.a fields that start with the search term (e.g. "blitz" for Therion's a.k.a. "Blitzkrieg")
4. a.k.a fields having a word that is not the first one start with the search term (e.g. "porta" for Within Temptation's a.k.a. "The Portal")
5. by band popularity for results with equal priority according to rules 1-4
6. alphabetical for results with equal priority according to rules 1-5

I had originally started without rule 5 but found it weird, that when I search for "empe" Emperium comes up higher in results than Emperor. So I made an executive decision that people would more likely search for popular bands.

Anyone with an opinion on this is more than welcome to contribute here.

Edit: I implemented the same thing for album searches, too. No "a.k.a" field here so sorting is a little simpler. But I also sort by band popularity in the end.
----
Loading...
09.03.2024 - 14:58
F3ynman2000
Nocturnal Bro
Contributor
^ looks great! Yeah, sorting by relevance (matches with first word come first) and then band popularity is a good solution, I think
Loading...
09.03.2024 - 15:38
corrupt
With a lowercase c
Admin
I added what I hope is some more convenience functionality.

  • The dropdown will now re-open when there is already text in the search bar and it is clicked again after the dropdown closing
  • When changing the search category after searching for a term, it will immediately perform the search again in the new category
----
Loading...
09.03.2024 - 16:16
corrupt
With a lowercase c
Admin
I guess today is search function day.

When experimenting with what I had just added, I realized there's no way to distinguish media types. So search will now display a small tag for media that is not an album:



And while I was at it, I added band flags, too, to be more consistent with band search.

I guess the search category "album" should be "releases" or something like that.
----
Loading...
09.03.2024 - 17:20
Redel
Moderator
Written by corrupt on 09.03.2024 at 14:30

I'm currently sorting in this order:

1. band names that start with the search term (e.g. "iro" for Iron Maiden)
2. band names having a word that is not the first one start with the search term (e.g. "maid" for Iron Maiden)
3. a.k.a fields that start with the search term (e.g. "blitz" for Therion's a.k.a. "Blitzkrieg")
4. a.k.a fields having a word that is not the first one start with the search term (e.g. "porta" for Within Temptation's a.k.a. "The Portal")
5. by band popularity for results with equal priority according to rules 1-4
6. alphabetical for results with equal priority according to rules 1-5



Hey, that is really great, how good you could implement this feature with a reasonable runtime. It improves search convenience by quite a bit I would say.

As to the ranking of rules for how to sort results, I think it is pretty obvious, as F3ynman said, that results should be sorted by relevance.
Now, here it gets a bit more tricky because there is -- at least in my eyes -- no obvious unique solution for how to define relevance in this context.
The ranking of rules you applied is one possible solution, and I think it is a proper one.
I am not entirely decided yet as to whether it is my preferred solution for defining relevance.
An obvious alternative I think would be to erase rules 1 and 2 entirely from the ranking, and move rule 5 (band popularity) up to top position.

I played around a bit with this, not too much yet though. To give you one example where this becomes relevant, I simulated a search for the album In Their Darkened Shrines. I assumed that someone might have forgotton that there is this preposition "In" at the beginning of the album title. So we would run a search for "their" and see what is returned (not actually hitting the search button, just taking a look at the results in the drop down). Now, since the number of displayed results seems to be limited to ten, for obvious reasons, the album I wanted to find is not even included in the results, since there are at least ten albums having a title starting with "Their", most of which appear to be of minor popularity ( at least to me). A ranking by band popularity on the contrary would probably have put the desired album up top.

Now, this is of course just one constructed example, I guess we could easily find other examples supporting the ranking of rules that is currently implemented. So I guess I should play around a bit more with the search function and return here for subsequent feedback later on.

[Wow, typing on my phone sucks so much again, .... again, ..... and again.]
Loading...
09.03.2024 - 17:52
corrupt
With a lowercase c
Admin
Written by Redel on 09.03.2024 at 17:20
An obvious alternative I think would be to erase rules 1 and 2 entirely from the ranking, and move rule 5 (band popularity) up to top position.

Those are the two most important rules. If you remove those, results will be super unintuitive. You subconsciously expect what you search for to be at the top after a few keystrokes. If we order everything by band popularity (or any metric, really) and ignore text matches, you will find pretty quickly that very rarely you will see your desired results at the top.

I'd need to do some research to find good examples, but the initial version of band search results didn't have these rules and tests were just weird.
----
Loading...
09.03.2024 - 18:02
Redel
Moderator
Written by corrupt on 09.03.2024 at 17:52

and ignore text matches

Oh no, that is not what I was going for, sorry if that was confusing.
Of course we need a rule looking for text matches. I guess I assumed this rule to be above all the other rules unconditionally, without actively thinking about it.

Still, yes, it is possible that I have overlooked something thus far, and that you are right in that there will be undesired ranking of results frequently.
I need to dig deeper into this. Lets see when I will find time for it.
But anyhow, great job here
Loading...
09.03.2024 - 18:23
Redel
Moderator
Written by Redel on 09.03.2024 at 18:02

Written by corrupt on 09.03.2024 at 17:52

and ignore text matches

I assumed this rule to be above all the other rules unconditionally

So, here is a bit more on how I assumed the algorithm would look like.
First step: filter all albums that have a match with the typed text.
Second step: apply a ranking of rules to the albums filtered in the first step in order to determine in which order they are displayed.
Loading...
09.03.2024 - 21:45
Starvynth
i c deaf people
Staff
I love the new features of the search bar to bits. If you work with the database on a regular basis, the display of country and genre is a game changer because since then I haven't selected the wrong band by mistake once. It's a real time saver and looks neat too. Thanks a bunch corrupt!
The order of the parameters is perfect for my purposes and I wouldn't change the priority of the search results.

However, I did notice one small thing: bands (or users, albums, etc.) with punctuation marks in their names are sometimes difficult to find if you don't know the exact spelling and position of the characters.

Sure, most of us know how Be'lakor is spelled, but you're totally lost if you happen to believe they're called B'elakor or Bel'akor.
Also, it's not possible to find the band ...And Oceans or Metallica's ...And Justice For All if you forget about the ellipses at the beginning.


So, is it perhaps possible to ignore punctuation marks?
----
signatures = SPAM
Loading...
09.03.2024 - 22:06
corrupt
With a lowercase c
Admin
Written by Starvynth on 09.03.2024 at 21:45
So, is it perhaps possible to ignore punctuation marks?

Not without introducing new unexpected behavior. I can't really do token search in a relational database.
I can filter out a set of characters before doing the matching of course, but at that point you would lose accuracy when you actually type your search correctly. I guess this is as far as we can push this with the technology we have.

The case of be'lakor and simliar bands can be fixed by adding an alternative writing to their a.k.a field ("belakor" for example). I could technically auto-generate a database field that removes all non-word characters from an album name and include that in the matching, but as soon as we leave latin script, the whole problem starts anew.
----
Loading...
09.03.2024 - 22:25
Redel
Moderator
How are blank spaces handled in the search algorithm, are they ignored?
When I type "The" into a search query for bands I get Therion up top, not to my surprise. Second is The Gathering.
If I then alter the search query and add a blank space: "The ", there is apparently no change in the selection and order of the displayed results in the drop down. Therion is still top. That was a bit unexpected tbh.
Loading...
09.03.2024 - 22:50
corrupt
With a lowercase c
Admin
Written by Redel on 09.03.2024 at 22:25
How are blank spaces handled in the search algorithm, are they ignored?
When I type "The" into a search query for bands I get Therion up top, not to my surprise. Second is The Gathering.
If I then alter the search query and add a blank space: "The ", there is apparently no change in the selection and order of the displayed results in the drop down. Therion is still top. That was a bit unexpected tbh.

Not handled at all. Could be that the queries automatically ignore trailing white spaces, but it'd have to investigate that. This is not and won't any time soon be a complex semantic search engine. It's still relatively simple word comparison where the database does most of the heavy lifting.
----
Loading...
09.03.2024 - 22:55
Redel
Moderator
Written by corrupt on 09.03.2024 at 22:50

but it'd have to investigate that.

Never mind, this is not an issue, it is good as it is.
Loading...