Page 1 of 1
Does search function only match whole words?

Posted:
Fri Aug 31, 2012 7:26 pm
by hakko
I was playing with the Subsonic 4.7 beta3 on the demo site. Does the search mechanism only match whole words?
I searched for "pilot" and expected it to match artist "Binaerpilot".
I searched for "pyromantik" and expected it to match album "Pyromantikk".
I search for "unite" and expected it to match song "L'Unité".
But it doesn't? Has it always been like that? I thought it was smarter, using Lucene and everything. I really thought it matched even misspelled words. Thanks if you can help me refresh my memory.
Re: Does search function only match whole words?

Posted:
Sat Sep 01, 2012 9:33 am
by hakko
I found the answer to my own question: it seems that you can search for pyro*, but not *pilot (using * as a wildcard). Searching for just pyro doesn't match anything.
I guess I'm just used to the iTunes interface where you can type any search string, like "beatles yellow sub", and have everything that matches returned. Searching for "beatles yellow sub*" seems very unnatural to me.
AW: Does search function only match whole words?

Posted:
Sat Sep 01, 2012 10:02 pm
by MadEvil
Hi Hakko,
Found out it can be done with:
queryParser.setAllowLeadingWildcard(true);
I will test this in the next days.
Best regards
Re: Does search function only match whole words?

Posted:
Sun Sep 02, 2012 9:03 am
by hakko
Nice! I guess people search in different ways, but I really think that the wildcard should be implicit. Why should all users have to learn that "yellow sub beatles" should have been typed in as "yellow sub* beatles" to give any match?
Anyway, I've switched to having PostgreSQL do the search/match, it seems smarter as I can then combine different database queries and for example search for "recently added albums called something X" or "recently played songs called Y".
Re: Does search function only match whole words?

Posted:
Mon Sep 03, 2012 9:35 pm
by MadEvil
Hi Hakko,
I test it and worked very well! I get more and better results with this addition with the default Query-parser!
best regards