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

          Hide
          Ryan McKinley added a comment -

          change indexDir to dataDir

          Show
          Ryan McKinley added a comment - change indexDir to dataDir
          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)
          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development