# Indexing MP3 files

The Mp3 search works only on servers supporting HTTP/1.1 protocol, if you wish to index ftp sites use proxy instead.

## MP3 indexer.conf commands

To activate MP3 tags detection set up your `indexer.conf` with some variables:

    CheckMp3Tag yes

When this option is enabled the spider downloads only 128 bytes to determine an MP3 file.

    IndexMP3TagOnly yes

When this option is enabled only MP3 tags are indexed, all HTML documents are searched for links only. In other case HTML and TEXT documents are indexed in usual manner and will be searchable.

    URLFileWeight 1

You may find useful to activate this option to index MP3 file names.

## How indexer processes MP3 tags

If file is recognized as MP3, indexer creates document in the following format:

    <html>
    <title>$SongName</title>
    <meta name=description content="$Artist">
    <meta name=keywords content="$Album $Year">
    <body>$Artist $Album $Year $SongName</body>
    </html>

So, title is filled with song name, description with artist, keywords is built as combination of album and year. Body is a combination of artist, album, year, song name.

## Search through author, album, song name

If you want restricted search by author, album or song name, use standard mechanism described in the section "Changing different document parts weights at search time" of Using search front-ends section. For example, if you want to restrict search by song name use standard by title restriction.

With default weights configuration, given in `indexer.conf-dist`, you may find useful to add this into `search.htm` to restrict search area:

    <SELECT NAME="wf">
    <OPTION VALUE="11110" SELECTED="$(wf)">All sections
    <OPTION VALUE="01000" SELECTED="$(wf)">Artist
    <OPTION VALUE="00100" SELECTED="$(wf)">Album
    <OPTION VALUE="00010" SELECTED="$(wf)">Song name
    <OPTION VALUE="10000" SELECTED="$(wf)">File name
    </SELECT>