Search implementation

David
2008-01-07
2013-05-30
  • David

    David - 2008-01-07

    As i read the source available on SVN. I discovered that no code has been made for implementing the search capabilities. Are there any plans on implementing search? I am considering implementing it myself but want to know whether code is underway.

    If no implementation is available/work-in-progres. How would a implementation best be implemented?

    David

     
    • Jin

      Jin - 2008-01-08

      Hi,

      that is correct - since search is only optional according to the spec we gave it a lower priority.

      We do plan to add it and we even did an effort estimate for that; it turned out that it is quite a lot of work if we want to do it properly. Some significant changes in our storage class may be needed, so probably a deep cut through the code - and that's probably the reason why it would be better if we do it ourselves. Sorry :)

      Kind regards,
      Jin

       
    • BernhardRode

      BernhardRode - 2008-03-25

      What about Strigi or Beagle?

      We have these two great search engines,
      espacially Strigi may be a real good deal imho.

       
    • Jin

      Jin - 2008-03-25

      The search there is not really related to the UPnP Search() action. Btw using those two as a backend instead or in addition to the existing database might also be an interesting option, but it's not related to the UPnP Search() feature.

       
  • panddeb

    panddeb - 2009-09-14

    Has the search action been implemented? If so, how do I turn it on?

    thanks for your reply

     
  • Jin

    Jin - 2009-12-03

    Nope, sorry, work on it has not even started yet, that will take quite a while.

     
  • paulv

    paulv - 2010-12-30

    Bump… Ok how about now? :)

    I have been googling for 2 straight days trying to figure out what i had setup wrong that i couldn't search my library.  Somehow I could not imagine that this would not be implemented.

    This seems to  me a very important feature to be able to search the library. I cannot imagine i am the only one who with > 10000 media files who would like to use Mediatomb together with something Eyecon and XBMC.

    Thanks. Great app!!!

     
  • Anonymous - 2013-01-10

    I stream my media at home to an Onkyo AV receiver and a Panasonic TV
    The selection will be done by the Android app BubbleUPNP. It's a very nice way to select tracks by just using build-in Speach-To-Text functionallity (say what you wanna hear/see).

    Therefor it was important to me that the media server has search capabilities.

    Because I'm a software developer in a big IT company and familar with C++ and had an off-time due to some illness, I started to implement the search functionallity by my own based in the svn repo of mediatomb 0.12.1
    The most tricky stuff was to handle recursive query functionallity which brough me to use mysql instead of sqlite3 (with do not support WITH-statements).

    The bad news is, with a scope to BubbleUPNP's search needs, my implementation has been finished, all works fine and so I've stopped working on it.

     
  • .onkel.

    .onkel. - 2013-01-10

    …to replace this shitty google account, here my real nick…

     
  • Anonymous - 2013-01-23

    to be able to seek a particular song or video, my personal feeling is simply that one should have a bunch of different sub-directories.
    Example with the GENRE + if (year) :

    'Audio', 'Genre', genre, 'Artist', artistABC, artist, 'Year', 'byAlbum', year, albumByArtist
    'Audio', 'Genre', genre, 'Artist', artistABC, artist, 'Year', 'byDecade', decade
    'Audio', 'Genre', genre, 'Artist', artistABC, artist, 'Year', 'byYear', year

    as of, I deeply modified common.js and the abcbox function, that now adds 24 differents segmentations just for audio.

    For a more precise search, I'm implementing the "search by word" function : it simply increment a chain array with any word from any titles (if word.length > 3) with a limit of 4 (or more) recursions, using as root the abcbox system :

    for title containing word 'absolute' :
       chain = ['Audio', 'byWord', '', 'ab…', 'abs…', 'abso…', absolute'];
       obj.title = title

     
  • Anonymous - 2013-02-20

    here is a sample code for implementing a "search" function, working by word in the mp3 titles as an examples.
    it will parse all of the words greater than x characters (you decide) and build an abcbox tree like this :
    -W-/W…/Wo…/Wor…/Word/media

    I guess it's the best alternative to the missing search function

    import.js

    var audioBranches = ['Artist','Album','albumArtist','Genre','Year','Word'];
    (...)
        if (mime == 'audio')
        {
    (...)
                addAudioByFolder(obj);
            addAudioABC(obj, audioBranches);
    (...)
    

    common.js

    function getWordsChain(str)
    {
    var maxWordSlice = 3;
    var minWordLength = 3;
        if (str.length >= minWordLength)
        {
        var wordABC=abcbox(str, 7, divchar);
        var maxWordLength = ((str.length <= maxWordSlice) ? (maxWordSlice - 1) : maxWordSlice);
        if (/\d+/.test(str)) maxWordLength = (maxWordSlice - 1);
        var wordsChain = [wordABC];
        for (var i=1;i<=maxWordLength;i++)
        {
            wordsChain.push(str.slice(0,i)+'...');
        }
        return wordsChain.concat(str);
        } else return;
    }
    function addAudioABC(obj, branches)
    {
    (...)
        if (/Word/.test(branches))
        {
            var words = title.replace(/\W/g,' ').replace(/ \w | \w$/g,' ').replace(/\s+/g,' ').split(' ');
            // print("common.js : addAudioABC : words="+words);
            var wordsChains = words.map(getWordsChain).filter(Boolean);
            // print("common.js : addAudioABC : wordsChains="+wordsChains);
            var startChain = ['Audio', 'byWord'];
            for (var w in wordsChains) {
                wordsChain = wordsChains[w];
                chain = startChain.concat(wordsChain, titleFromCompilationYear);chains.push(chain);
            }
        }
    (...)
    }
    

    hope that can help

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks