Confused about how searching works

Need help? Post your questions here.

Moderator: moderators

Confused about how searching works

Postby dln949 » Sun Sep 13, 2015 4:51 am

Version 5.2.1 (build 4428) – March 4, 2015

Server jetty-6.1.x, java 1.8.0_45-internal, Linux (102.6 MB / 142.0 MB)

desktop computer is running Ubuntu 15.04

I still have 10 days left on my trial.


I don't understand how the search function works. Is it searching the file's tags only, or just the file name, or the file path, or some combination of the three?
dln949
 
Posts: 8
Joined: Wed Sep 09, 2015 12:08 pm

Re: Confused about how searching works

Postby frnx » Mon Sep 14, 2015 7:32 pm

It's not working that well for me either, a shame since everything else has absolutely no issues. I've had a case where searching for a specific artist name only yielded artist names like "feat. [artist]", but not the exact artist (that DID exist and was shown in both the ID3 tags and folder names on the left panel!). Well, it had multibyte Unicode characters in it, but that can't be it, right? :roll:
frnx
 
Posts: 44
Joined: Sun May 31, 2015 8:30 pm

Re: Confused about how searching works

Postby frnx » Mon Sep 14, 2015 8:05 pm

This got me to look into how Subsonic handles searching. I didn't dive into the code yet so I am not sure of the specific rules, but had a quick look at the Lucene indexes with Luke. Here are my guesses :

  • There are 5 "categories" in the lucene2 directory: artists, artists_id3, albums, albums_id3, songs.
  • At least in my library, top-level directory names appear to be used as artist names, then directories below are used as album names -- see the artists and albums indexes.
  • It does seem to handle ID3 tags -- see the artists_id3 and albums_id3 indexes.
  • I'm assuming search queries are run against each of them in a specific order then aggregated.
  • It doesn't handle non-English languages very well ; Chinese/Japanese artist names, in my case, were split character by character, which explained the incoherent search results I observed.

There you go ;)
frnx
 
Posts: 44
Joined: Sun May 31, 2015 8:30 pm

Re: Confused about how searching works

Postby daneren2005 » Mon Sep 14, 2015 8:21 pm

There are separate API methods to do searches by ID3 Tags so that is probably what the _id3 sets are for.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Confused about how searching works

Postby frnx » Mon Sep 14, 2015 8:45 pm

daneren2005 wrote:There are separate API methods to do searches by ID3 Tags so that is probably what the _id3 sets are for.

Ha, that's what the "Per-folder" checkbox in DSub does?

Code: Select all
SearchResult artists = searchService.search(criteria, musicFolders, SearchService.IndexType.ARTIST);
command.setArtists(artists.getMediaFiles());

SearchResult albums = searchService.search(criteria, musicFolders, SearchService.IndexType.ALBUM);
command.setAlbums(albums.getMediaFiles());

SearchResult songs = searchService.search(criteria, musicFolders, SearchService.IndexType.SONG);
command.setSongs(songs.getMediaFiles());

The above code is how Subsonic handles searching in the web interface. If I'm guessing correctly, since it's not using IndexType.ALBUM_ID3 and IndexType.ARTIST_ID3, it's not searching for ID3 tags but only for path components. If that's true, that's a shame... :(
frnx
 
Posts: 44
Joined: Sun May 31, 2015 8:30 pm

Re: Confused about how searching works

Postby daneren2005 » Mon Sep 14, 2015 9:28 pm

No, the "Per Folder" checkbox restricts the album lists to just the folder you have selected. I know, not very intuitive, but I couldn't think of a verbose enough label that would fit there. To browse by tags in DSub you do Settings -> Servers -> Your Server -> Browse By Tags. You lose the ability to change folders since it is not supported by the API though.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Confused about how searching works

Postby dln949 » Mon Sep 14, 2015 11:57 pm

ok...... So......

For a layman like me, what is the answer to the original question in this thread?
dln949
 
Posts: 8
Joined: Wed Sep 09, 2015 12:08 pm

Re: Confused about how searching works

Postby john_es » Mon Oct 26, 2015 1:03 am

Yeah, I am curious too. All of my songs are tagged, however I don't keep them in one giant folder... rather it's broken up by a few top-level ones and then by artist-album. Still, searching is pretty much non-existent.
john_es
 
Posts: 8
Joined: Sat Dec 13, 2014 5:55 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 18 guests