Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7383

DIH: rewrite XPathEntityProcessor/RSS example as the smallest good demo possible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.0, 6.0
    • 6.6, 7.0
    • None

    Description

      The DIH example (solr/example/example-DIH/solr/rss/conf/rss-data-config.xml) is broken again. See associated issues.

      Below is a config that should work.

      This is caused by Slashdot seemingly oscillating between RDF/RSS and pure RSS. Perhaps we should depend upon something more static, rather than an external service that is free to change as it desires.

      <dataConfig>
          <dataSource type="URLDataSource" />
          <document>
              <entity name="slashdot"
                      pk="link"
                      url="http://rss.slashdot.org/Slashdot/slashdot"
                      processor="XPathEntityProcessor"
                      forEach="/RDF/item"
                      transformer="DateFormatTransformer">
      				
                  <field column="source" xpath="/RDF/channel/title" commonField="true" />
                  <field column="source-link" xpath="/RDF/channel/link" commonField="true" />
                  <field column="subject" xpath="/RDF/channel/subject" commonField="true" />
      			
                  <field column="title" xpath="/RDF/item/title" />
                  <field column="link" xpath="/RDF/item/link" />
                  <field column="description" xpath="/RDF/item/description" />
                  <field column="creator" xpath="/RDF/item/creator" />
                  <field column="item-subject" xpath="/RDF/item/subject" />
                  <field column="date" xpath="/RDF/item/date" dateTimeFormat="yyyy-MM-dd'T'HH:mm:ss" />
                  <field column="slash-department" xpath="/RDF/item/department" />
                  <field column="slash-section" xpath="/RDF/item/section" />
                  <field column="slash-comments" xpath="/RDF/item/comments" />
              </entity>
          </document>
      </dataConfig>
      

      Attachments

        1. atom_20170315.tgz
          4 kB
          Alexandre Rafalovitch
        2. rss-data-config.xml
          1 kB
          Jan Høydahl
        3. SOLR-7383.patch
          367 kB
          Alexandre Rafalovitch

        Issue Links

          Activity

            People

              arafalov Alexandre Rafalovitch
              upayavira Upayavira
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: