Solr
  1. Solr
  2. SOLR-943

Make it possible to specify dataDir in solr.xml

    Details

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

      Description

      It should be possible to specify dataDir directly for a core in solr.xml (over and above specifying it as a variable). It should also be possible to pass the dataDir as a request parameter while creating a core through the REST API.

      A simple scenario which requires this feature is when the location of the data directory depends on runtime parameters (such as free disk space or number of directories inside a directory).

      1. SOLR-943.patch
        5 kB
        Shalin Shekhar Mangar
      2. SOLR-943.patch
        5 kB
        Shalin Shekhar Mangar
      3. SOLR-943.patch
        5 kB
        Noble Paul
      4. SOLR-943.patch
        4 kB
        Noble Paul

        Issue Links

          Activity

          Hide
          Noble Paul added a comment -

          updated to trunk

          Show
          Noble Paul added a comment - updated to trunk
          Hide
          Shalin Shekhar Mangar added a comment -

          Are there any objections on getting this committed? Thoughts?

          Show
          Shalin Shekhar Mangar added a comment - Are there any objections on getting this committed? Thoughts?
          Hide
          Yonik Seeley added a comment -

          If there were also a way to specify a different index directory, we could get rid of the new file based method, right?

          Show
          Yonik Seeley added a comment - If there were also a way to specify a different index directory, we could get rid of the new file based method, right?
          Hide
          Shalin Shekhar Mangar added a comment -

          Not entirely. This may help if we reload the core which happens rarely (replication of new configuration). The file based method is necessary in case of out of sync index (requiring a new index directory) but when there is no need to reload the current core and a commit will suffice.

          Show
          Shalin Shekhar Mangar added a comment - Not entirely. This may help if we reload the core which happens rarely (replication of new configuration). The file based method is necessary in case of out of sync index (requiring a new index directory) but when there is no need to reload the current core and a commit will suffice.
          Hide
          Noble Paul added a comment -

          If there were also a way to specify a different index directory, we could get rid of the new file based method, right?

          do you mean having a dataDir as well as the indexDir ?

          This means we will have to call persist from a handler after changing that. Currently there is no means to change any property while the core is up and running. It is only possible during core creation. We will have to make quite some changes to make this possible

          Show
          Noble Paul added a comment - If there were also a way to specify a different index directory, we could get rid of the new file based method, right? do you mean having a dataDir as well as the indexDir ? This means we will have to call persist from a handler after changing that. Currently there is no means to change any property while the core is up and running. It is only possible during core creation. We will have to make quite some changes to make this possible
          Hide
          Yonik Seeley added a comment -

          OK, I think I see - index.propertiesis created programmaticallly by SnapPuller... that does change things (I had thought a user would need to create it manually).

          Show
          Yonik Seeley added a comment - OK, I think I see - index.propertiesis created programmaticallly by SnapPuller... that does change things (I had thought a user would need to create it manually).
          Hide
          Shalin Shekhar Mangar added a comment -

          Fixing issue with absolute paths ending with a '/' character.

          Show
          Shalin Shekhar Mangar added a comment - Fixing issue with absolute paths ending with a '/' character.
          Hide
          Shalin Shekhar Mangar added a comment -

          Committed revision 741490.

          Added ability to specify dataDir in solr.xml as well as ability to specify dataDir in CoreAdmin's core create command.

          Thanks Noble!

          Show
          Shalin Shekhar Mangar added a comment - Committed revision 741490. Added ability to specify dataDir in solr.xml as well as ability to specify dataDir in CoreAdmin's core create command. Thanks Noble!
          Hide
          Shalin Shekhar Mangar added a comment -

          Changes to CoreContainer.persist to save dataDir if specified in solr.xml

          Show
          Shalin Shekhar Mangar added a comment - Changes to CoreContainer.persist to save dataDir if specified in solr.xml
          Hide
          Shalin Shekhar Mangar added a comment -

          Committed revision 755667.

          Show
          Shalin Shekhar Mangar added a comment - Committed revision 755667.
          Hide
          Grant Ingersoll added a comment -

          Bulk close Solr 1.4 issues

          Show
          Grant Ingersoll added a comment - Bulk close Solr 1.4 issues

            People

            • Assignee:
              Shalin Shekhar Mangar
              Reporter:
              Shalin Shekhar Mangar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development