Using quotes in search: I just don't get how this works

Maybe you guys can help me out?

I'm more a funk/boogie head, and hence this is mainly what I search for.
However, I've also searched for something just to understand how these doggone quotes work!

Up to this day, I just don't get them. Maybe this feature just doesn't work right in SoulseekQt?

I'll give an example that you can test out yourself. It's a common artist for funk heads, but not like Kool & The Gang, so you won't get flooded with results.

Once I try with

"ron banks"

I (currently) get ONE track included in "The Complete Stax-Volt...'72-75" compilation.

However, once I try with

ron banks zap

without the quotes, I get likewise lots of Ron Banks 'Zap' hits.
BUT why doesn't this work when I do use the quotes?

One of the tracks of the second attempt is exactly

"Ron Banks - 04 - Zap.mp3"

However, it was NOT shown when I did use the quotes.
As I said in the subject line, I'm just lost here. It's all a bit illogical. Or it does not work as designed.

And as far as I know, there is no documentation of the Qt version yet, so we can't but rely on self-explanatory features. Or be lost on the way, as I am at the moment. :)

dserodio's picture

I'd love to understand the search syntax too, a little documentation on how search terms and operators work would be great.

After you did a search, there will appear a button on the bottom of the screen called 'Filter Help' Just click on it and the you'll get help for the search syntax. Qt doesn't work with quotes like a search in e.g. Google.

Don't mix up search syntax with filter syntax.
That's a completely different thing.

Filter syntax is explained for search RESULTS.
That is, there must be something THERE you previously were searching for.
Technically, this is called a result set.

And as we're at IT speak, it's like a web site where you run a javascript on. If there is no DOM content, the javascript is of no use. Nor will be all that fancy filtering magic.

But what we'd like to have documented is the syntax for the search FIELD, or if you want it that way, take influence in the "creation" of a search result set, i. e. make it smaller beforehand, maybe even to accelerate the filtering applied afterwards.

Searching is step #1, and filtering is step #2.

Quotes are tricky. Since searches on the Soulseek network are distributed, the client has to handle a high volume of searches very quickly, without using too much CPU. For that purpose, files you're sharing are indexed by tokens, which are words that appear in each filename and the folder name they're in. The way the client processes quotes is by looking for the quoted text in each filename. So to avoid going over all of your shared files, it needs to have some kind of starting set, meaning it needs to have at least one unquoted token to work with. One thing that could certainly be done by the client is to break down the quoted text into tokens and add it to the search, so that the receiver has a starting set of all the words contained in the quotes but then also verify they appear in the right order. That wouldn't work though if the quotes don't begin and end with whole tokens.

I still don't get the inner workings of it.

To me: "Quotes = exact search" or, as in Google, find two words that must be exactly one word next to the other, with no other words in between.
Otherwise quotes simply are no use for the user whatsoever.

If the "Google way" does not happen to be the way the quotes work in Soulseek search, too, this must be explained properly to the user. Since we are no clairvoyants who can guess how something works in a closed-source application. If this was OSS, some tech-savvy guys (me too) might get an insight by checking out the documentation in source code. But it isn't. Hence it makes less sense if only the developer knows how the syntax of certain "gimmicks" is like. And besides, in contrary to what leijsten said, the quotes (and also the asterisk '*') are NOT explained in Filter Help at all.
Otherwise I would probably not have asked, since it was the first place I looked.

At the moment, I can only circumvent exact search by doing something crazy as this:

searchterm -exclude1 -exclude2 -exclude3 -exclude4 -exclude5

With each decade, tracks worldwide become more. EVEN MORE. And so we are going to get way more search results than ever.

No need to get upset, I'm trying to explain why quotes work the way they do. When you search Google, their server takes the hit. When you search Soulseek, every Soulseek client on the network takes a hit, so you have to be more careful. I agree that I should inform the user of this behavior, but I'm also offering a possible solution. I think I'm going to try the solution I suggested and post a link to a new build here. Once I do you can try it out and tell me how it works out for you.

Thanks, a link to a new build will be fine.

I'm trying to explain why quotes work the way they do

And I was trying to point out my doubt that having them work the way they are working now would be of any use to the user. :)

And no, I wasn't upset, I just may sound like this whenever I try to describe the importance of something presented to the user, and also the circumstances he is in (e. g. unable to peek in the source code as in this case). Sorry about that.

And before I forget...

Otherwise I would probably not have asked, since it was the first place I looked.

This was NOT because of you.
It was mainly because somebody else clearly mixed up searching things with filtering search results ( = the product of a previous search), and, unfortunately, I do have a habit of sometimes getting a little "gruff" whenever people try to "help" you in that notorious sort of way "'Just click on it' (why ask here? c'mon, it's all written there!)", suggesting that I was "just too blind to see". Hah, if only it was THAT trivial! In almost all cases, this is due to somebody failing to read the question properly.