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 "Ryan McKinley (JIRA)" <ji...@apache.org> on 2008/07/07 19:52:31 UTC

[jira] Created: (SOLR-619) Register copyField at runtime

Register copyField at runtime
-----------------------------

                 Key: SOLR-619
                 URL: https://issues.apache.org/jira/browse/SOLR-619
             Project: Solr
          Issue Type: New Feature
            Reporter: Ryan McKinley
            Assignee: Ryan McKinley
            Priority: Minor
             Fix For: 1.3


In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.

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


[jira] Resolved: (SOLR-619) Register copyField at runtime

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

Ryan McKinley resolved SOLR-619.
--------------------------------

    Resolution: Fixed

commited a while back

> Register copyField at runtime
> -----------------------------
>
>                 Key: SOLR-619
>                 URL: https://issues.apache.org/jira/browse/SOLR-619
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-619-RuntimeSchema.patch, SOLR-619-RuntimeSchema.patch, SOLR-619.patch
>
>
> In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.

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


[jira] Commented: (SOLR-619) Register copyField at runtime

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

Yonik Seeley commented on SOLR-619:
-----------------------------------

Noble - I don't think your variation is thread safe.  I don't believe it can be without some level of synchronization or volatile on the read-side.  Since a truly thread-safe implementation requires slowing down the read-side,  I think adding copyFields should (for now) be restricted to use before or during the inform() phase.

> Register copyField at runtime
> -----------------------------
>
>                 Key: SOLR-619
>                 URL: https://issues.apache.org/jira/browse/SOLR-619
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-619-RuntimeSchema.patch, SOLR-619.patch
>
>
> In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.

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


[jira] Updated: (SOLR-619) Register copyField at runtime

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

Ryan McKinley updated SOLR-619:
-------------------------------

    Attachment: SOLR-619-RuntimeSchema.patch

This patch moves the copyField registration out of a for loop and into a public function.

The downside to this approach is that the dynamicCopyField array is resized for each new dynamic copy field rather then building a List, then converting to an array.  Since this is only at startup and is likely an unmesuarable change (unless you have LOTS of dynamic copy fields), this seems like an ok tradeoff.

> Register copyField at runtime
> -----------------------------
>
>                 Key: SOLR-619
>                 URL: https://issues.apache.org/jira/browse/SOLR-619
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-619-RuntimeSchema.patch
>
>
> In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.

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


Re: [jira] Updated: (SOLR-619) Register copyField at runtime

Posted by Georgios Stamatis <ge...@arisem.com>.
Ryan McKinley (JIRA) wrote:
>      [ https://issues.apache.org/jira/browse/SOLR-619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Ryan McKinley updated SOLR-619:
> -------------------------------
>
>     Attachment: SOLR-619-RuntimeSchema.patch
>
> updated patch that includes tests and better javadocs describing when each call is safe to make.  This also adds a function: refreshAnalyzers() that reloads the anylyzers.  This is necessary if you modify the schema fields returned from getFields()
>
> This does not add any synchronization, it just relies on things being called within inform()
>
>
>
>   
>> Register copyField at runtime
>> -----------------------------
>>
>>                 Key: SOLR-619
>>                 URL: https://issues.apache.org/jira/browse/SOLR-619
>>             Project: Solr
>>          Issue Type: New Feature
>>            Reporter: Ryan McKinley
>>            Assignee: Ryan McKinley
>>            Priority: Minor
>>             Fix For: 1.3
>>
>>         Attachments: SOLR-619-RuntimeSchema.patch, SOLR-619-RuntimeSchema.patch, SOLR-619.patch
>>
>>
>> In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.
>>     
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>   

Hello,

I recently saw this issue and have some questions:

   1.

      What is the vision of this issue, will copy fields continue to
      exist in schema.xml?

   2.

      Is it possible to add (merge) SOLR-538 [copy field max length] to
      this issue? If yes I can provide a patch that merges the SOLR-538
      to SOLR-619.

Thanks in advance,

Georgios.




[jira] Updated: (SOLR-619) Register copyField at runtime

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

Ryan McKinley updated SOLR-619:
-------------------------------

    Attachment: SOLR-619-RuntimeSchema.patch

updated patch that includes tests and better javadocs describing when each call is safe to make.  This also adds a function: refreshAnalyzers() that reloads the anylyzers.  This is necessary if you modify the schema fields returned from getFields()

This does not add any synchronization, it just relies on things being called within inform()



> Register copyField at runtime
> -----------------------------
>
>                 Key: SOLR-619
>                 URL: https://issues.apache.org/jira/browse/SOLR-619
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-619-RuntimeSchema.patch, SOLR-619-RuntimeSchema.patch, SOLR-619.patch
>
>
> In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.

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


[jira] Commented: (SOLR-619) Register copyField at runtime

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614814#action_12614814 ] 

Noble Paul commented on SOLR-619:
---------------------------------

If the fields are made volatile , should it be ok? How expensive are volatile fields?

bq.I think adding copyFields should (for now) be restricted to use before or during the inform() phase.

I would g w/ this approach.Making reads expensive is *not an option*.  

> Register copyField at runtime
> -----------------------------
>
>                 Key: SOLR-619
>                 URL: https://issues.apache.org/jira/browse/SOLR-619
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-619-RuntimeSchema.patch, SOLR-619.patch
>
>
> In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.

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


[jira] Updated: (SOLR-619) Register copyField at runtime

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

Noble Paul updated SOLR-619:
----------------------------

    Attachment: SOLR-619.patch

a threadsafe version of the same

> Register copyField at runtime
> -----------------------------
>
>                 Key: SOLR-619
>                 URL: https://issues.apache.org/jira/browse/SOLR-619
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-619-RuntimeSchema.patch, SOLR-619.patch
>
>
> In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.

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


[jira] Commented: (SOLR-619) Register copyField at runtime

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

Yonik Seeley commented on SOLR-619:
-----------------------------------

This patch has thread safety issues if the new API were to be used from more than one thread, or concurrently with searching.

> Register copyField at runtime
> -----------------------------
>
>                 Key: SOLR-619
>                 URL: https://issues.apache.org/jira/browse/SOLR-619
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-619-RuntimeSchema.patch
>
>
> In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.

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


[jira] Commented: (SOLR-619) Register copyField at runtime

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

Yonik Seeley commented on SOLR-619:
-----------------------------------

Can this issue be closed?

> Register copyField at runtime
> -----------------------------
>
>                 Key: SOLR-619
>                 URL: https://issues.apache.org/jira/browse/SOLR-619
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-619-RuntimeSchema.patch, SOLR-619-RuntimeSchema.patch, SOLR-619.patch
>
>
> In order to enable runtime schema manipulation, it would be nice to register copy fields manually rather then requiring them to be registered via schema.xml.

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