#!/bin/bash java it.unimi.dsi.mg4j.document.JdbcDocumentCollection -p encoding=utf-8 \ -p 'wordreader=it.unimi.dsi.io.FastBufferedReader(#)' \ -f IdentityDocumentFactory \ -f HtmlDocumentFactory \ -f IdentityDocumentFactory \ -f IdentityDocumentFactory \ -n title -n text -n dummy0 -n dummy1 -n snippet -n tag \ -d com.mysql.jdbc.Driver lsr.collection "jdbc:mysql://localhost/lsr?user=lsr&password=lsr" \ "snippet.id as id, title as dummy, title, text, snippet, concat(ifnull(tag0.name,''), ' ', ifnull(tag1.name,''), ' ', ifnull(tag2.name,''), ' ', ifnull(tag3.name,''), ' ', ifnull(tag4.name,''), ' ', ifnull(tag5.name,''), ' ', ifnull(tag6.name,'')) as tags from snippet \ left outer join tag as tag0 on id_tag0_tag=tag0.id \ left outer join tag as tag1 on id_tag1_tag=tag1.id \ left outer join tag as tag2 on id_tag2_tag=tag2.id \ left outer join tag as tag3 on id_tag3_tag=tag3.id \ left outer join tag as tag4 on id_tag4_tag=tag4.id \ left outer join tag as tag5 on id_tag5_tag=tag5.id \ left outer join tag as tag6 on id_tag6_tag=tag6.id" \ -w "approved='1'" -i "snippet.id" java -Xmx256M it.unimi.dsi.mg4j.tool.IndexBuilder -S lsr.collection --downcase lsr ## We don't index the docs, we just want the core LSR mirror: #find $(pwd)/../../html/doc -iname \*.html -not -iname \*.fr.\* -not -iname \*ChangeLog\* -not -size +1M | \ # java it.unimi.dsi.mg4j.document.FileSetDocumentCollection \ # -p encoding=UTF-8 -f HtmlDocumentFactory lilydocs.collection # #java -Xmx256M it.unimi.dsi.mg4j.tool.IndexBuilder -S lilydocs.collection --downcase lilydocs