Solr
  1. Solr
  2. SOLR-442

FileFloatSource should read file from dataDir, not indexDir

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3
    • Component/s: search
    • Labels:
      None

      Description

      The FileFloatSource currently loads its file from the indexDir:

      parser.getReq().getCore().getIndexDir()

      This is a problem for an empty index since you get a FileNotFoundException.

      Rather then using indexDir, this should use getDataDir()

        Issue Links

          Activity

          Ryan McKinley created issue -
          Hide
          Ryan McKinley added a comment -

          change indexDir to dataDir

          Show
          Ryan McKinley added a comment - change indexDir to dataDir
          Ryan McKinley made changes -
          Field Original Value New Value
          Attachment SOLR-442-UseDataDir.patch [ 12372047 ]
          Ryan McKinley made changes -
          Link This issue relates to SOLR-433 [ SOLR-433 ]
          Hide
          Yonik Seeley added a comment -

          +1

          If one wants the file in the index directory they can specify index/filename
          Does that actually work with the current code (I know I wrote it, but I really don't recall)?
          Perhaps the test schema should be changed to verify.

          Show
          Yonik Seeley added a comment - +1 If one wants the file in the index directory they can specify index/filename Does that actually work with the current code (I know I wrote it, but I really don't recall)? Perhaps the test schema should be changed to verify.
          Hide
          Ryan McKinley added a comment -

          commited. The test creates a file on the fly... (there isn't an example using FileFloatSource)

          Show
          Ryan McKinley added a comment - commited. The test creates a file on the fly... (there isn't an example using FileFloatSource)
          Ryan McKinley made changes -
          Assignee Ryan McKinley [ ryantxu ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hide
          Yonik Seeley added a comment -

          Ahhh, I had forgotten that the filename is derived from the fieldname.
          So if the field is named x, the file will be named external_x

          We should make the prefix configurable, so hopefully one would be able to set it to index/external_
          if they want those files in the index directory. The issue is that today, replication only takes a snapshot
          of the index directory, so some people will have to use that until it's fixed.

          Show
          Yonik Seeley added a comment - Ahhh, I had forgotten that the filename is derived from the fieldname. So if the field is named x, the file will be named external_x We should make the prefix configurable, so hopefully one would be able to set it to index/external_ if they want those files in the index directory. The issue is that today, replication only takes a snapshot of the index directory, so some people will have to use that until it's fixed.
          Uwe Schindler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          2h 29m 1 Ryan McKinley 21/Dec/07 01:48
          Resolved Resolved Closed Closed
          1967d 8h 50m 1 Uwe Schindler 10/May/13 11:39

            People

            • Assignee:
              Ryan McKinley
              Reporter:
              Ryan McKinley
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development