You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "TJ Laurenzo (JIRA)" <ji...@apache.org> on 2008/01/23 16:08:34 UTC

[jira] Created: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
------------------------------------------------------------------------------------------------------------------

                 Key: SOLR-465
                 URL: https://issues.apache.org/jira/browse/SOLR-465
             Project: Solr
          Issue Type: New Feature
    Affects Versions: 1.3
            Reporter: TJ Laurenzo


Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.

A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
   <directoryProvider class="class.name">
      <!-- Parameters as required by the implementation -->
   </directoryProvider>

This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated SOLR-465:
-----------------------------

    Attachment: SOLR-465.patch

Updated to trunk and now uses NIOFSDirectory if non-windows OS is detected.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646782#action_12646782 ] 

Mark Miller commented on SOLR-465:
----------------------------------

Sorry guys, this patch isnt right for NIODirectory. You can't control the directory that way. Will have to think of something else...at worst users will have to select with a java property rather than auto getting the good stuff.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645348#action_12645348 ] 

Yonik Seeley commented on SOLR-465:
-----------------------------------

Patch looks good to me - I'll commit shortly.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649340#action_12649340 ] 

Shalin Shekhar Mangar commented on SOLR-465:
--------------------------------------------

LUCENE-1451 has been committed. So all we need is to upgrade the lucene jars in the solr lib, right?

If there are no objections, I'll do that today.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SOLR-465.
-------------------------------

    Resolution: Fixed

Committed.  Thanks Mark!

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated SOLR-465:
-----------------------------

    Attachment: SOLR-465.patch

I should have also changed the SolrCore use of SolrIndexWriter to create an index to use a non deprecated SolrIndexWriter constructor.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>            Assignee: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-465-fixes.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647027#action_12647027 ] 

Shalin Shekhar Mangar commented on SOLR-465:
--------------------------------------------

bq. But couldn't one start the container with the appropriate system property pointing to the new NIOFSDirectory class and "turn on" NIOFSDirectory (or any other Directory) that way?

Why not specify in solrconfig.xml?

Another question I had was -- Is it possible to use RAMDirectory too?

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647902#action_12647902 ] 

Mark Miller commented on SOLR-465:
----------------------------------

Thats the hope once we upgrade to a Lucene with LUCENE-1451, but right now its not possible to auto do it - you have to set the system property.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647022#action_12647022 ] 

Otis Gospodnetic commented on SOLR-465:
---------------------------------------

But couldn't one start the container with the appropriate system property pointing to the new NIOFSDirectory class and "turn on" NIOFSDirectory (or any other Directory) that way?


> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647899#action_12647899 ] 

Shalin Shekhar Mangar commented on SOLR-465:
--------------------------------------------

bq. Possibly...I think automatic has a lot of allure though...
Automatic is great. I was only referring to using solrconfig.xml instead of system property for this. I see now that this system property is used by Lucene and not Solr.

Just for my understanding, now Solr uses NIOFSDirectory automatically but only on non-windows platforms, is that correct?

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647002#action_12647002 ] 

Yonik Seeley commented on SOLR-465:
-----------------------------------

Hmmm, can you expand on what's wrong?

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "TJ Laurenzo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

TJ Laurenzo updated SOLR-465:
-----------------------------

    Attachment: solr-directory-provider.patch

Patch to add DirectoryProvider configurability to Solr.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>         Attachments: solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651584#action_12651584 ] 

Mark Miller commented on SOLR-465:
----------------------------------

Sorry, this fell off my radar. I'll post another patch to finish this up this weekend.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649344#action_12649344 ] 

Mark Miller commented on SOLR-465:
----------------------------------

We will need a tiny new patch as well...ill put it up as soon as the jars are upgraded .

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated SOLR-465:
-----------------------------

    Attachment: SOLR-465.patch

changes made

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>            Assignee: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-465-fixes.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated SOLR-465:
-----------------------------

    Attachment: SOLR-465.patch

Sorry, missed UpdateHandler in that last patch - new patch to fix. Eclipse is both a blessing and a curse :)

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>            Assignee: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-465-fixes.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637633#action_12637633 ] 

Mark Miller commented on SOLR-465:
----------------------------------

I've worked a bit on updating this to trunk, but it has a bit of overlap with solr-243, so if either are going in, it will be much easier to finish the other after.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Otis Gospodnetic updated SOLR-465:
----------------------------------

    Fix Version/s: 1.4

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley reopened SOLR-465:
-------------------------------


reopening.  LUCENE-1451 has been committed, adding public constructors to FSDirectory and subclasses.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated SOLR-465:
-----------------------------

    Attachment: SOLR-465.patch

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll closed SOLR-465.
--------------------------------


> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>            Assignee: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-465-fixes.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647008#action_12647008 ] 

Mark Miller commented on SOLR-465:
----------------------------------

You will get an FSDirectory no matter which OS. Open is a static method that pulls from a system property for the directory impl to use. So its not broken per say (you can set the property and get the right stuff), but you wont get the NIOFSDirectory automatically on non windows like the code implies. I'm going to try and make it workable at the Lucene level without the sys property is my hope.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Andrew Klochkov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Klochkov updated SOLR-465:
---------------------------------

    Attachment: SOLR-465-fixes.patch

I tried to use custom Directory implementation which doesn't use file system and found that there are some places in the Solr code which don't let to do this 'cause they instantiate FSDirectory. Here is my patch, please review it and apply if it's Ok. I don't have rights to re-open the issue.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465-fixes.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649467#action_12649467 ] 

Shalin Shekhar Mangar commented on SOLR-465:
--------------------------------------------

I have upgraded Lucene jars to r719351

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated SOLR-465:
-----------------------------

    Attachment: SOLR-465.patch

New patch.

Updates things to trunk, tweaks things to be more like latest SOLR-243, adds a unit test to make sure alternate DirectoryFactory is used.

Looks like we will want to use an alternate Directory for UNIX systems due to LUCENE-753 (which in the end adds a new Directory implementation called org.apache.lucene.store.NIOFSDirectory). Makes sense to fit this issue into that.

Once Lucene is up to date, I'll add a new patch that returns a directory based on the OS from the default Factory.

- Mark

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>         Attachments: SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SOLR-465.
-------------------------------

    Resolution: Fixed

Thanks guys, I just committed this.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man reopened SOLR-465:
---------------------------

      Assignee: Yonik Seeley

Hmmm... yes, this does seem to be an oversight.

the root issue seems to be that there is still a SolrIndexWriter constructor that takes a IndexDeletionPolicy but does *not* take a DirectoryFactory. 

the latest patch seems to be adding yet another constructor (that takes both) and modifies the callers of the existing IndexDeletionPolicy method to use the new one ... but since the IndexDeletionPolicy code was added after 1.3 we can just change it.

It also seems like it might be a good idea to add some logging to SolrIndexWriter.getDirectory(String,SolrIndexConfig) warning people when legacy code is being used that might not be respecting their DirectoryFactory.

reopening, assigning to Yonik to review since he & Miller worked on this originally


> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>            Assignee: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-465-fixes.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715282#action_12715282 ] 

Uwe Schindler commented on SOLR-465:
------------------------------------

I committed a changed version of the FSDirectory today to Lucene trunk (LUCENE-1658). The ctor/class name of the default directory impl is now SimpleFSDirectory vs. NIOFSDirectory and MMapDirectory. All three dirs can no instantiated by a one-arg and two-arg ctor (File[, LockFactory]).

FSDirectory will get abstract in 3.0 and so cannot be instantiated (only protected ctor). It is now also a factory, to choose automatically the best variant for the platform: FSDirectory.open(File[, LockFactory])

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>            Assignee: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-465-fixes.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647034#action_12647034 ] 

Mark Miller commented on SOLR-465:
----------------------------------

bq. But couldn't one start the container with the appropriate system property pointing to the new NIOFSDirectory class and "turn on" NIOFSDirectory (or any other Directory) that way?

Yes. Thats why I say its not really broken.  It will still work, and you can still change the impl...but the code implies you will get the right impl for the right OS, and you won't without using that system property. Hoping to make that pain go away.

bq. Why not specify in solrconfig.xml?

Possibly...I think automatic has a lot of allure though...

bq. Is it possible to use RAMDirectory too?

The factory returns a Directory, so it is in that sense...it may have other ramifications though depending on what solr assumes. Don't know off hand.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>             Fix For: 1.4
>
>         Attachments: SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SOLR-465.
-------------------------------

    Resolution: Fixed

Thanks Mark, committed.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>            Assignee: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-465-fixes.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-465) Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702173#action_12702173 ] 

Mark Miller commented on SOLR-465:
----------------------------------

Bah, those constructors came in after this patch - they should be the issues reopened! ;)

I'll put up a patch changing it.

> Add configurable DirectoryProvider so that alternate Directory implementations can be specified via solrconfig.xml
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-465
>                 URL: https://issues.apache.org/jira/browse/SOLR-465
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: TJ Laurenzo
>            Assignee: Yonik Seeley
>             Fix For: 1.4
>
>         Attachments: SOLR-465-fixes.patch, SOLR-465.patch, SOLR-465.patch, SOLR-465.patch, solr-directory-provider.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Solr is presently hard-coded to use the FSDirectory implementation in Lucene.  Other Directory implementations are possible.  This patch creates a new DirectoryProvider interface and extends SolrCore to load an implementation of it from solrconfig.xml (if specified).  If not specified, then it will fallback to the FSDirectory.
> A DirectoryProvider plugin can be configured in solrconfig.xml with the following XML:
>    <directoryProvider class="class.name">
>       <!-- Parameters as required by the implementation -->
>    </directoryProvider>
> This patch was created against solr trunk checked out on 11/20/2007.  Most of it is new code and should apply cleanly or with minor relocation.  If it does not, let me know and I will update.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.