title: Indexing and querying BLOBS stored in Mysql
body: <p>Greeting friends,</p>
  
  <p>Straight to the point. I have stored many BLOBS in a Mysql DB. These are mainly PDF's(80%) and .doc. I have also text in the DB. Till now i have indexed and i can query the text, but i cannot index the BLOBS. I am trying to make a single collection(document)-but sucks. Is there any recipe on how to do such a thing?</p>
  
  <p><strong>A portion of data-config.xml:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;dataConfig&gt;
  
  &lt;dataSource type="JdbcDataSource"
    autoCommit="true" batchSize="-1"
    convertType="false"
    driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://127.0.0.1:3306/ktimatologio"
    user="root"
    password="********"
    name="db"/&gt;
  
  &lt;dataSource name="fieldReader" type="FieldStreamDataSource" /&gt;  
  
    &lt;document&gt; 
  
      &lt;entity name="aitiologikes_ektheseis"
      dataSource="db"
      transformer="HTMLStripTransformer"
      query="select id, title, title AS grid_title, model, type, url, last_modified, CONCAT_WS('_',id,model) AS solr_id, search_tag, CONCAT( body,' ',title)  AS content from aitiologikes_ektheseis where type = 'text'"
      deltaImportQuery="select id, title, title AS grid_title, model, type, url, last_modified, CONCAT_WS('_',id,model) AS solr_id, search_tag, CONCAT( body,' ',title)  AS content from aitiologikes_ektheseis where type = 'text' and id='${dataimporter.delta.id}'"
      deltaQuery="select id, title, title AS grid_title, model, type, url, last_modified, CONCAT_WS('_',id,model) AS solr_id, search_tag, CONCAT( body,' ',title)  AS content from aitiologikes_ektheseis where type = 'text' and last_modified &amp;gt; '${dataimporter.last_index_time}'"&gt;
        &lt;field column="id" name="ida" /&gt;               
        &lt;field column="solr_id" name="solr_id" /&gt;
        &lt;field column="title" name="title" stripHTML="true" /&gt;
        &lt;field column="grid_title" name="grid_title" stripHTML="true" /&gt;
        &lt;field column="model" name="model" stripHTML="true" /&gt;
        &lt;field column="type" name="type" stripHTML="true" /&gt;
        &lt;field column="url" name="url" stripHTML="true" /&gt;
        &lt;field column="last_modified" name="last_modified" stripHTML="true"  /&gt;
        &lt;field column="search_tag" name="search_tag" stripHTML="true" /&gt;
        &lt;field column="content" name="content" stripHTML="true" /&gt;
      &lt;/entity&gt;
  
      &lt;entity name="aitiologikes_ektheseis_bin"
      query="select id, title, title AS grid_title, model, type, url, last_modified, CONCAT_WS('_',id,model) AS solr_id, search_tag, bin_con AS text from aitiologikes_ektheseis where type = 'bin'"
      deltaImportQuery="select id, title, title AS grid_title, model, type, url, last_modified, CONCAT_WS('_',id,model) AS solr_id, search_tag, bin_con AS text from aitiologikes_ektheseis where type = 'bin' and id='${dataimporter.delta.id}'"
      deltaQuery="select id, title, title AS grid_title, model, type, url, last_modified, CONCAT_WS('_',id,model) AS solr_id, search_tag, bin_con AS text from aitiologikes_ektheseis where type = 'bin' and last_modified &amp;gt; '${dataimporter.last_index_time}'"
      transformer="TemplateTransformer"
      dataSource="db"&gt;         
        &lt;field column="id" name="ida" /&gt;               
        &lt;field column="solr_id" name="solr_id" /&gt;
        &lt;field column="title" name="title" stripHTML="true" /&gt;
        &lt;field column="grid_title" name="grid_title" stripHTML="true" /&gt;
        &lt;field column="model" name="model" stripHTML="true" /&gt;
        &lt;field column="type" name="type" stripHTML="true" /&gt;
        &lt;field column="url" name="url" stripHTML="true" /&gt;
        &lt;field column="last_modified" name="last_modified" stripHTML="true"  /&gt;
        &lt;field column="search_tag" name="search_tag" stripHTML="true" /&gt;
  
        &lt;entity dataSource="fieldReader" processor="TikaEntityProcessor" dataField="aitiologikes_ektheseis_bin.text" format="text"&gt; 
            &lt;field column="text" name="contentbin" stripHTML="true" /&gt;
        &lt;/entity&gt;
  
      &lt;/entity&gt;
  
         ...
         ...
    &lt;/document&gt; 
  
  &lt;/dataConfig&gt;
  </code></pre>
  
  <p><strong>A portion from schema.xml (the fieldTypes and filed definition):</strong></p>
  
  <pre><code>&lt;fieldType name="text_ktimatologio" class="solr.TextField" positionIncrementGap="100"&gt;
  
  &lt;analyzer type="index"&gt;               
    &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt;
    &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt" enablePositionIncrements="true"/&gt;
    &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
    &lt;filter class="solr.EnglishPossessiveFilterFactory"/&gt;               
    &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_el.txt" enablePositionIncrements="true"/&gt;
    &lt;filter class="solr.GreekLowerCaseFilterFactory"/&gt;
    &lt;filter class="solr.GreekStemFilterFactory"/&gt;       
    &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
    &lt;filter class="solr.PorterStemFilterFactory"/&gt;
  &lt;/analyzer&gt; 
  
  &lt;analyzer type="query"&gt;
    &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt;
    &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/&gt;
    &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt" enablePositionIncrements="true"/&gt;               
    &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_el.txt" enablePositionIncrements="true"/&gt;               
    &lt;filter class="solr.GreekLowerCaseFilterFactory"/&gt;
    &lt;filter class="solr.GreekStemFilterFactory"/&gt;
    &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
    &lt;filter class="solr.EnglishPossessiveFilterFactory"/&gt;
    &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
    &lt;filter class="solr.PorterStemFilterFactory"/&gt;
  &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  
  &lt;fieldType name="text" class="solr.TextField" positionIncrementGap="100"&gt;
  &lt;analyzer type="index"&gt;
    &lt;charFilter class="solr.HTMLStripCharFilterFactory"/&gt;
    &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt;
    &lt;filter class="solr.StandardFilterFactory"/&gt;   
    &lt;filter class="solr.LowerCaseFilterFactory"/&gt;                               
    &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_el.txt" enablePositionIncrements="true"/&gt;               
    &lt;filter class="solr.GreekLowerCaseFilterFactory"/&gt;
    &lt;filter class="solr.GreekStemFilterFactory"/&gt;
    &lt;filter class="solr.HunspellStemFilterFactory" dictionary="dictionaries/el_GR.dic" affix="dictionaries/el_GR.aff" ignoreCase="true" /&gt;
  &lt;/analyzer&gt;
  
  &lt;analyzer type="query"&gt;
    &lt;charFilter class="solr.HTMLStripCharFilterFactory"/&gt;
    &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt;
    &lt;filter class="solr.StandardFilterFactory"/&gt;
    &lt;filter class="solr.LowerCaseFilterFactory"/&gt;   
    &lt;filter class="solr.LowerCaseFilterFactory"/&gt;                               
    &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_el.txt" enablePositionIncrements="true"/&gt;               
    &lt;filter class="solr.GreekLowerCaseFilterFactory"/&gt;
    &lt;filter class="solr.GreekStemFilterFactory"/&gt;
    &lt;filter class="solr.HunspellStemFilterFactory" dictionary="dictionaries/el_GR.dic" affix="dictionaries/el_GR.aff" ignoreCase="true" /&gt;
  &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  
  &lt;fields&gt;
    &lt;field  name="ida" type="string" indexed="true" stored="true" multiValued="false"/&gt;
    &lt;field  name="solr_id" type="string" indexed="true" stored="true" multiValued="false"/&gt; 
    &lt;field  name="title" type="text_ktimatologio" indexed="true" stored="true"/&gt;
    &lt;field  name="grid_title" type="text_ktimatologio" indexed="true" stored="true"/&gt;
    &lt;field  name="model" type="string" indexed="true" stored="true" multiValued="false"/&gt;
    &lt;field  name="type" type="string" indexed="true" stored="true"/&gt;
    &lt;field  name="url" type="string" indexed="true" stored="true"/&gt;
    &lt;field  name="last_modified" type="string" indexed="true" stored="true"/&gt;
    &lt;field  name="search_tag" type="string" indexed="true" stored="true"/&gt;
    &lt;field  name="contentbin" type="text" indexed="true" stored="true" multiValued="true"/&gt;
    &lt;field  name="content" type="text_ktimatologio" indexed="true" stored="true" multiValued="true"/&gt;     
  &lt;/fields&gt;
  </code></pre>
  
  <p>I really need help on this!</p>
  
  <p>With respect,</p>
  
  <p>Tom</p>
  
  <p>Greece </p>