Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Acoustid Index

Acoustid Index is a "number search engine". It's similar to text search
engines, but instead of searching in documents that consist of words,
it searches in documents that consist of 32-bit integers.

It's a simple inverted index data structure that doesn't do any kind of
processing on the indexed documents. This is useful for searching in
Chromaprint[1] audio fingerprints, which are nothing more than 32-bit
integer arrays.


Reindexing from the Acoustid database:

 $ echo "COPY (SELECT id, acoustid_extract_query(fingerprint) FROM fingerprint) TO stdout DELIMITER '|' " \
       | psql -U acoustid acoustid | ./fpi-import -d idx/ -c -o

 1. Stop importing
 2. UPDATE fingerprint_index_queue SET fingerprint_id = (SELECT max(id) FROM fingerprint);
 3. Index the database
 4. Start importing

Running the server:

$ ./fpi-server 
Listening on "" port 6080 

Simple client session:

$ telnet 6080
Connected to
Escape character is '^]'.
insert 1 368308215,364034037,397576085,397509509,393249669,389054869
insert 2 1574172159,1598222797,1564660173,1564656069,1564537317,1565584741
insert 3 1130316157,1096749341,1075786015,1075655999,1075656047,1079977343
search 1130316157,397509509,393249669,389054869
OK 1:3 3:1
Connection closed by foreign host.

Recent activity

Nothing to see here, move along.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.