Querying the MediaStore is coming up with results that don't appear to match
<p>I'm new to Android development and I've been working on a custom music player for my own use.  After quite a bit of searching, I finally tracked down some code I could use to search the MediaStore for music files.  This is the code I'm using.</p>

<pre><code>Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;

StringBuilder where = new StringBuilder();
where.append(MediaStore.Audio.Media.TITLE + " != ''");

// Add in the filtering constraints
String [] keywords = null;
if (query != null) {
    String [] searchWords = query.split(" ");
    keywords = new String[searchWords.length];
    Collator col = Collator.getInstance();
    col.setStrength(Collator.IDENTICAL);

    for (int i = 0; i &lt; searchWords.length; i++) {
        keywords[i] = '%' + MediaStore.Audio.keyFor(searchWords[i]) + '%';
    }


    for (int i = 0; i &lt; searchWords.length; i++) {
        where.append(" AND ");
        where.append(MediaStore.Audio.Media.ARTIST_KEY + "||");
        where.append(MediaStore.Audio.Media.TITLE_KEY + " LIKE ?");
    }
}

String selection = where.toString();

String[] projection = {
        BaseColumns._ID,   
        MediaStore.Audio.Media.MIME_TYPE, 
        MediaStore.Audio.Artists.ARTIST,
        MediaStore.Audio.Albums.ALBUM,
        MediaStore.Audio.Media.TITLE
};


Cursor cursor = this.managedQuery(
        uri,
        projection,
        selection,
        keywords,
        MediaStore.Audio.Media.TITLE);
</code></pre>

<p>If I search for "Laredo", I expect it to come back with just "The Streets of Laredo" by Johnny Cash.  It's included in the results, but there's a couple dozen other songs being returned that don't seem to match my query at all.</p>

<p>The built-in music player seems to be doing the same thing, although it's returning even more unrelated matches.  Is this the expected behavior?  If it is, I can add some additional code to filter my list down to exact matches.  If it's not, what am I doing wrong?</p>
