<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Not able to index filename using Cloudera Solr MarR (file content is getting stored and searchab in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Not-able-to-index-filename-using-Cloudera-Solr-MarR-file/m-p/40494#M26847</link>
    <description>&lt;P&gt;To get full hdfs filepath and filename into index, just&amp;nbsp;add the following to schema.xml, then create collection and then index using mapR. Nothing needs to be specified in morphline config file.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;lt;field name="file_path" type="string" indexed="true" stored="true" /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;field name="file_name" type="string" indexed="true" stored="true" /&amp;gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2016 05:59:00 GMT</pubDate>
    <dc:creator>AnindyaNeogi</dc:creator>
    <dc:date>2016-05-05T05:59:00Z</dc:date>
    <item>
      <title>Not able to index filename using Cloudera Solr MarR (file content is getting stored and searchable)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Not-able-to-index-filename-using-Cloudera-Solr-MarR-file/m-p/40366#M26846</link>
      <description>&lt;P&gt;Not able to index filename using Cloudera Solr MarR (file content is getting stored and searchable):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;I am Using MapReduceIndexerTool to index various types of files (doc, pdf, xls etc)&lt;/P&gt;&lt;P&gt;${SOLR_HOME}/contrib/mr/search-mr-*-job.jar org.apache.solr.hadoop.MapReduceIndexerTool&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;I am using morphline solrCell command chaining&lt;/P&gt;&lt;P&gt;fmap : { content : text, content-type : content_type }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;In schema.xml I have below entry&lt;/P&gt;&lt;P&gt;&amp;lt;field name="resourcename" type="text_general" indexed="true" stored="true"/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;copyField source="resourcename" dest="text"/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;If needed, I will provide the solrconfig.xml details&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;I have below code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IndexReader reader = DirectoryReader.&lt;EM&gt;open&lt;/EM&gt;(rdir);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document doc = reader.document(0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.&lt;STRONG&gt;&lt;EM&gt;out&lt;/EM&gt;&lt;/STRONG&gt;.println("Fields: " + doc.getFields());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I observed is : the filename/resourcename has not been indexed.&lt;/P&gt;&lt;P&gt;I only see these fields:&lt;/P&gt;&lt;P&gt;content_type:application/pdf:&lt;/P&gt;&lt;P&gt;id:c385c455-5c1a-4284-937b-e88003fa3438#0:&lt;/P&gt;&lt;P&gt;author:Neogi, Anindya:&lt;/P&gt;&lt;P&gt;author_s:Neogi, Anindya:&lt;/P&gt;&lt;P&gt;last_modified:1461302622000:&lt;/P&gt;&lt;P&gt;_version_:1533216476522086400:&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:16:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Not-able-to-index-filename-using-Cloudera-Solr-MarR-file/m-p/40366#M26846</guid>
      <dc:creator>AnindyaNeogi</dc:creator>
      <dc:date>2022-09-16T10:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to index filename using Cloudera Solr MarR (file content is getting stored and searchab</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Not-able-to-index-filename-using-Cloudera-Solr-MarR-file/m-p/40494#M26847</link>
      <description>&lt;P&gt;To get full hdfs filepath and filename into index, just&amp;nbsp;add the following to schema.xml, then create collection and then index using mapR. Nothing needs to be specified in morphline config file.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;lt;field name="file_path" type="string" indexed="true" stored="true" /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;field name="file_name" type="string" indexed="true" stored="true" /&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 05:59:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Not-able-to-index-filename-using-Cloudera-Solr-MarR-file/m-p/40494#M26847</guid>
      <dc:creator>AnindyaNeogi</dc:creator>
      <dc:date>2016-05-05T05:59:00Z</dc:date>
    </item>
  </channel>
</rss>

