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

SolrEntityProcessor - DIH EntityProcessor that queries an external Solr via SolrJ

    XMLWordPrintableJSON

Details

    Description

      The SolrEntityProcessor queries an external Solr instance. The Solr documents returned are unpacked and emitted as DIH fields.

      The SolrEntityProcessor uses the following attributes:

      • solr='http://localhost:8983/solr/sms'
        • This gives the URL of the target Solr instance.
          • Note: the connection to the target Solr uses the binary SolrJ format.
      • query='Jefferson&sort=id+asc'
        • This gives the base query string use with Solr. It can include any standard Solr request parameter. This attribute is processed under the variable resolution rules and can be driven in an inner stage of the indexing pipeline.
      • rows='10'
        • This gives the number of rows to fetch per request..
        • The SolrEntityProcessor always fetches every document that matches the request..
      • fields='id,tag'
        • This selects the fields to be returned from the Solr request.
        • These must also be declared as <field> elements.
        • As with all fields, template processors can be used to alter the contents to be passed downwards.
      • timeout='30'
        • This limits the query to 5 seconds. This can be used as a fail-safe to prevent the indexing session from freezing up. By default the timeout is 5 minutes.

      Limitations:

      • Solr errors are not handled correctly.
      • Loop control constructs have not been tested.
      • Multi-valued returned fields have not been tested.

      The unit tests give examples of how to use it as the root entity and an inner entity.

      Attachments

        1. SOLR-1499.core.rev1182017.patch
          9 kB
          Pulkit Singhal
        2. SOLR-1499.patch
          85 kB
          Luca Cavanna
        3. SOLR-1499.patch
          91 kB
          Luca Cavanna
        4. SOLR-1499.patch
          33 kB
          Luca Cavanna
        5. SOLR-1499.patch
          33 kB
          Ahmet Arslan
        6. SOLR-1499.patch
          29 kB
          Lance Norskog
        7. SOLR-1499.patch
          25 kB
          Erik Hatcher
        8. SOLR-1499.patch
          24 kB
          Erik Hatcher
        9. SOLR-1499.patch
          24 kB
          Lance Norskog
        10. SOLR-1499.patch
          24 kB
          Lance Norskog
        11. SOLR-1499.tests.rev1182017.patch
          24 kB
          Pulkit Singhal
        12. SOLR-1499-3x.patch
          88 kB
          Martijn van Groningen
        13. SOLR-1499-trunk.patch
          83 kB
          Martijn van Groningen

        Activity

          People

            Unassigned Unassigned
            lancenorskog Lance Norskog
            Votes:
            8 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: