[mb-bugs] Re: [MusicBrainz Bug Tracker] #2806: improve error
handling for range searches that are too long
MusicBrainz Bug Tracker
noreply at musicbrainz.org
Wed May 2 21:04:21 UTC 2007
#2806: improve error handling for range searches that are too long
----------------------------------------+-----------------------------------
Reporter: paultaylor | Owner: rob
Type: bug | Status: assigned
Priority: normal | Milestone: Server 2007-XX-YY
Component: MusicBrainz Server Search | Version: Server 2007-04-01
Resolution: | Keywords: search
Browser: | Os:
----------------------------------------+-----------------------------------
Changes (by rob):
* status: new => assigned
* summary: Indexed search does not support Range Searches => improve
error handling for range searches that are too
long
Comment:
The range searches do work, its the error handling that requires
improvement.
Lucene expands range queries by adding terms for each possible value in
the range. You can see where this breaks down quickly. In order to find a
track that falls within a certain range, use the qdur field, which was
designed for this purpose:
` track:Minus AND artist:beck AND (qdur:75 OR qdur:76 OR qdur:77)`
qdur is the quantized duration. Take the duration you're looking for,
divide by 2000 (for 2 second fuzz factor) and then check that quantized
(76) bin and the one to the left (75) and right (77). That method will
find tracks that fall into a 6 second range, which has been working great
for matching track durations.
--
Ticket URL: <http://bugs.musicbrainz.org/ticket/2806#comment:2>
MusicBrainz Bug Tracker <http://musicbrainz.org>
MusicBrainz -- the music metadatabase
More information about the Musicbrainz-bugs
mailing list