Solr
  1. Solr
  2. SOLR-7546

SimplePostTool (and thus bin/post) cannot index files with unknown extensions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0, 5.1
    • Fix Version/s: 5.2, 6.0
    • Component/s: scripts and tools
    • Labels:
      None

      Description

      With Solr 5.1.0, indexing a png file does not work:

      $ bin/post -filetypes png -c test2 docs/images/quickstart-query-screen.png 
      java -classpath /Users/erikhatcher/solr-5.1.0/dist/solr-core-5.1.0.jar -Dauto=yes -Dfiletypes=png -Dc=test2 -Ddata=files org.apache.solr.util.SimplePostTool docs/images/quickstart-query-screen.png
      SimplePostTool version 5.0.0
      Posting files to [base] url http://localhost:8983/solr/test2/update...
      Entering auto mode. File endings considered are png
      SimplePostTool: WARNING: Skipping quickstart-query-screen.png. Unsupported file type for auto mode.
      1 files indexed.
      COMMITting Solr index changes to http://localhost:8983/solr/test2/update...
      Time spent: 0:00:00.039
      

      "png" is not in SimplePostTool's mimeMap data structure and thus is considered unsupported.

      Instead, when in auto mode, SimplePostTool should send anything it encounters (within the `filetypes` constraint) to Solr.

      1. SOLR-7546.patch
        3 kB
        Erik Hatcher

        Activity

        Hide
        Erik Hatcher added a comment -

        patch to allow every file (in auto mode, that passes the `filetypes` check) to be sent to Solr. Also removed suspicious code in reset() method that set the file filter to default state, ignoring the filetypes setting.

        Show
        Erik Hatcher added a comment - patch to allow every file (in auto mode, that passes the `filetypes` check) to be sent to Solr. Also removed suspicious code in reset() method that set the file filter to default state, ignoring the filetypes setting.
        Hide
        ASF subversion and git services added a comment -

        Commit 1680047 from Erik Hatcher in branch 'dev/trunk'
        [ https://svn.apache.org/r1680047 ]

        SOLR-7546: bin/post (and SimplePostTool in -Dauto=yes mode) now sends rather than skips files without a known content type, as application/octet-stream, provided it still is in the allowed filetypes setting

        Show
        ASF subversion and git services added a comment - Commit 1680047 from Erik Hatcher in branch 'dev/trunk' [ https://svn.apache.org/r1680047 ] SOLR-7546 : bin/post (and SimplePostTool in -Dauto=yes mode) now sends rather than skips files without a known content type, as application/octet-stream, provided it still is in the allowed filetypes setting
        Hide
        ASF subversion and git services added a comment -

        Commit 1680048 from Erik Hatcher in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1680048 ]

        SOLR-7546: bin/post (and SimplePostTool in -Dauto=yes mode) now sends rather than skips files without a known content type, as application/octet-stream, provided it still is in the allowed filetypes setting (merged from trunk r1680047)

        Show
        ASF subversion and git services added a comment - Commit 1680048 from Erik Hatcher in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1680048 ] SOLR-7546 : bin/post (and SimplePostTool in -Dauto=yes mode) now sends rather than skips files without a known content type, as application/octet-stream, provided it still is in the allowed filetypes setting (merged from trunk r1680047)
        Hide
        Anshum Gupta added a comment -

        Bulk close for 5.2.0.

        Show
        Anshum Gupta added a comment - Bulk close for 5.2.0.

          People

          • Assignee:
            Erik Hatcher
            Reporter:
            Erik Hatcher
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development