Skip to content

Limit search results #50

@Phrogz

Description

@Phrogz

I have a DB that's currently at 17k songs (and growing). Some search terms can produce a lot of results, like:

@mpd.where file:'.'
@mpd.where any:'e'

Calls like this take 1.3 seconds on the server before they return. In my interface I then go on to truncate the results to the first 500. I'd like to be able to:

@mpd.where {file:'.'}, {limit:500}

and have the results limited for me.

I realize that this requires MPD support. I've posted a feature request on the MPD forum.

(FWIW, I also tried modifying build_songs_list in parser.rb to accept an optional limit, to reduce the number of songs created in the map. Reducing the map set from 16883 songs to 500 songs only reduced the time from 1.27s to 1.23s, a negligible savings.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions