title: How to extract metatags from HTML files and index them in SOLR and TIKA
body: <p>I am trying to extract the metatags of HTML files and indexing them into solr with tika integration. I am not able to extract those metatags with Tika and not able to display in solr.</p>
  
  <p>My HTML file is look like this.</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;meta name="product_id" content="11"/&gt;
  &lt;meta name="assetid" content="10001"/&gt;
  &lt;meta name="title" content="title of the article"/&gt;
  &lt;meta name="type" content="0xyzb"/&gt;
  &lt;meta name="category" content="article category"/&gt;
  &lt;meta name="first" content="details of the article"/&gt;
  
  &lt;h4&gt;title of the article&lt;/h4&gt;
  &lt;p class="link"&gt;&lt;a href="#link"&gt;How cite the Article&lt;/a&gt;&lt;/p&gt;
  &lt;p class="list"&gt;
    &lt;span class="listterm"&gt;Length: &lt;/span&gt;13 to 15 feet&lt;br&gt;
    &lt;span class="listterm"&gt;Height to Top of Head: &lt;/span&gt;up to 18 feet&lt;br&gt;
    &lt;span class="listterm"&gt;Weight: &lt;/span&gt;1,200 to 4,300 pounds&lt;br&gt;
    &lt;span class="listterm"&gt;Diet: &lt;/span&gt;leaves and branches of trees&lt;br&gt;
    &lt;span class="listterm"&gt;Number of Young: &lt;/span&gt;1&lt;br&gt;
    &lt;span class="listterm"&gt;Home: &lt;/span&gt;Sahara&lt;br&gt;
  &lt;/p&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>My data-config.xml file look like this</p>
  
  <pre><code>&lt;dataConfig&gt;
  &lt;dataSource name="bin" type="BinFileDataSource" /&gt;
      &lt;document&gt;   
      &lt;entity name="f" dataSource="null" rootEntity="false"
          processor="FileListEntityProcessor"
          baseDir="/path/to/html/files/" 
          fileName=".*html|xml" onError="skip"
          recursive="false"&gt;
  
          &lt;field column="fileAbsolutePath" name="path" /&gt;
          &lt;field column="fileSize" name="size"/&gt;
          &lt;field column="file" name="filename"/&gt;
  
          &lt;entity name="tika-test" dataSource="bin" processor="TikaEntityProcessor" 
          url="${f.fileAbsolutePath}" format="text" onError="skip"&gt;
  
          &lt;field column="product_id" name="product_id" meta="true"/&gt;
          &lt;field column="assetid" name="assetid" meta="true"/&gt;
          &lt;field column="title" name="title" meta="true"/&gt;
          &lt;field column="type" name="type" meta="true"/&gt;
          &lt;field column="first" name="first" meta="true"/&gt;
          &lt;field column="category" name="category" meta="true"/&gt;      
          &lt;/entity&gt;
      &lt;/entity&gt;
  &lt;/document&gt;
  &lt;/dataConfig&gt;
  </code></pre>
  
  <p>In my schema.xml file I have added the following fields.</p>
  
  <pre><code>&lt;field name="product_id" type="string" indexed="true" stored="true"/&gt;
  &lt;field name="assetid" type="string" indexed="true" stored="true" /&gt;
  &lt;field name="title" type="string" indexed="true" stored="true"/&gt;
  &lt;field name="type" type="string" indexed="true" stored="true"/&gt;
  &lt;field name="category" type="string" indexed="true" stored="true"/&gt;
  &lt;field name="first" type="text_general" indexed="true" stored="true"/&gt;
  </code></pre>
  
  <p>In my solrconfing.xml file I have added the following code.</p>
  
  <pre><code>&lt;requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler" /&gt;
  &lt;lst name="defaults"&gt;
    &lt;str name="config"&gt;/path/to/data-config.xml&lt;/str&gt;
  &lt;/lst&gt;
  </code></pre>
  
  <p>can anyone know how to extract those metatags from the HTML files and index them in solr and Tika? your help will be appreciated.</p>