Announcement

Collapse
No announcement yet.

Search implementation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Search implementation

    > Too bad cannot use it as is. Could you please point me to the part of
    > source code does this? I'm not very familiar with the LMS code.


    If you're interested in the SQL used, you could run LMS with logging
    enabled for database.sql. That should give you a good idea of the
    queries being used by LMS.

    BTW: the fulltext indes is optional. It's a plugin which can be
    disabled. In that case you could use the same queries as LMS.

    #2
    Search implementation

    Hello there,

    After years using Logitech Media Server, my collection is quite messy, I'm trying to automate the process cleaning up my collection. One thing I want to replicate is the search in the LMS, so I don't have to do the manual search.

    Here is an example: I put in "Alfred Brendel Schubert Piano Sonata"; it will return all albums/tracks with all the searched words, no matter the searched word is in "album title", "track title", "url", or "contributor name" etc. And the speed is extremely fast. This looks like a full text search in sqlite, but I didn't find any virtual tables in library.db.

    I'm very curious how this is done. As I just started automation and diving into LMS, any direction/help is appreciated.

    Thanks in advance.

    Comment


      #3
      Search implementation

      > Here is an example: I put in "Alfred Brendel Schubert Piano Sonata"; it
      > will return all albums/tracks with all the searched words, no matter the
      > searched word is in "album title", "track title", "url", or "contributor
      > name" etc. And the speed is extremely fast. This looks like a full text
      > search in sqlite, but I didn't find any virtual tables in library.db.


      It's indeed a fulltext index. But you won't be able to use it the way
      it's used in LMS as the plugin is registering some custom functions to
      calculate the weight etc. used in the queries.
      Michael

      "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
      (LMS: Settings/Information)

      Comment


        #4
        Too bad cannot use it as is. Could you please point me to the part of source code does this? I'm not very familiar with the LMS code.

        Thanks,

        Comment


          #5
          Thank you very much, this is helpful.

          Comment

          Working...
          X