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 "Noble Paul (JIRA)" <ji...@apache.org> on 2008/07/03 15:46:45 UTC

[jira] Created: (SOLR-614) lesser noise in solrconfig.xml

lesser noise in solrconfig.xml
------------------------------

                 Key: SOLR-614
                 URL: https://issues.apache.org/jira/browse/SOLR-614
             Project: Solr
          Issue Type: Improvement
    Affects Versions: 1.3
            Reporter: Noble Paul


All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

-- 
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-614) lesser noise in solrconfig.xml

Posted by Preetam Rao <bl...@gmail.com>.
This looks neat. As a user, this looks more convenient than the other
format.
Hope this gets into 1.3

------------
Preetam

On Fri, Jul 4, 2008 at 12:41 PM, Noble Paul (JIRA) <ji...@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Noble Paul updated SOLR-614:
> ----------------------------
>
>    Attachment: SOLR-614.patch
>
> This patch can automatically make these representations equivalent. This is
> fully backward compitible.
> * NamedList format: 1
> {code:xml}
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>  <lst name="spellchecker">
>    <str name="name">default</str>
>    <str
> name="classname">org.apache.solr.spelling.IndexBasedSpellChecker</str>
>    <str name="field">spell</str>
>    <str name="spellcheckIndexDir">./spellchecker</str>
>  </lst>
>  <lst name="spellchecker">
>    <str name="name">jarowinkler</str>
>    <str name="field">lowerfilt</str>
>    <str
> name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
>    <str name="spellcheckIndexDir">./spellchecker</str>
>  </lst>
> </searchComponent>
> {code}
> * NamedList Format : 2
> {code:xml}
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>  <spellchecker>
>    <name>default</name>
>    <classname>solr.IndexBasedSpellChecker</classname>
>    <field>spell</field>
>    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
>  </spellchecker>
>  <spellchecker>
>    <name>jarowinkler</name>
>    <field>lowerfilt</field>
>
>  <distanceMeasure>org.apache.lucene.search.spell.JaroWinklerDistance</distanceMeasure>
>    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
>  </spellchecker>
> </searchComponent >
> {code}
> *NamedList format :3
> {code:xml}
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>  <spellchecker name="default"
>                classname="solr.IndexBasedSpellChecker"
>                field="spell" spellcheckIndexDir="./spellchecker"/>
>  <spellchecker name="jarowinkler"
>                field="lowerfilt"
>
>  distanceMeasure="org.apache.lucene.search.spell.JaroWinklerDistance"
>                spellcheckIndexDir="./spellchecker"/>
> </searchComponent >
> {code}
>
>
>
>
> > lesser noise in solrconfig.xml
> > ------------------------------
> >
> >                 Key: SOLR-614
> >                 URL: https://issues.apache.org/jira/browse/SOLR-614
> >             Project: Solr
> >          Issue Type: Improvement
> >    Affects Versions: 1.3
> >            Reporter: Noble Paul
> >         Attachments: SOLR-614.patch
> >
> >
> > All the components initialized by Solr have an init(NamedList args)
> initializer. This leads us to writing the configuration needed for the
> component in the NamedList xml format. People familiar with Solr may know
> the format but most of what is written is noise than information. For users
> who are not familiar w/ the format find it too difficult to understand why
> they have to write it this way. Moreover , it is not a very efficient way to
> configure .
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul commented on SOLR-614:
---------------------------------

This one change has the potential to cleanup a lot of ugly XPath reading in our code. The intend here is to cleanup our internal code if needed. In many places (eg:updateHandler , SOLR-660 etc) we have a simple format but the parsing code is still ugly. 


> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617319#action_12617319 ] 

Ryan McKinley commented on SOLR-614:
------------------------------------

Perhaps I'm not thinking of configurations substantially complex to warrant this change.  Is there something concrete I'm not thinking about?  Is there anything that could not be represented with the existing format?

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul commented on SOLR-614:
---------------------------------

bq... if we make this change, then someone who is already familiar with the way handlers are configured won't understand the "/replication" example Noble posted
the feature that is already under development may have its syntax not yet finalized . So when we eventually commit it, it may have a different syntax. 

bq.There is a lot of value in maintaining consistency - even if it's ugly.

We do not have consistency in the way multiple components are configured. eg: UpdateHandler, UpdateProcessorChain, mainIndex etc.  

bq.the fact remains that if a single type of plugin (ie: RequestHandler) can support multiple config syntaxes the potential exists for people to get very confused 

We must not support multiple formats . We must stick to one an we will support only one .

bq.Looking ahead two or three moves: adding support for something like this now would also probably make it that much harder to write a "converter" for existing solr config files if/when we switch to Spring or some other Java object wiring/configuration system. 

We are trivializing a config format switch . It is not going to be as simple as writing a simple converter. We may need total rewiring of components which may involve code modification for all the components. 

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620320#action_12620320 ] 

Hoss Man commented on SOLR-614:
-------------------------------

FWIW...

bq. We do not have consistency in the way multiple components are configured. eg: UpdateHandler, UpdateProcessorChain, mainIndex etc.

There is a *huge* difference between having different types of plugins (ie: UpdateHandlers and RequestHandlers) configured with different syntaxes and allowing completely different config syntaxes for different implementations of the same type of plugin (ie: RequestHandler) -- people are not surprised when dissimilar things have dissimilar configuration, they are suprised when two tings of the same "type" can be configured with radically different syntaxes.

bq. We must not support multiple formats . We must stick to one an we will support only one .

This comment doesn't make sense to me ... we have one syntax right now, this issue adds an arbitrary number of new syntaxes for any type of plugin whose init() method takes a NamedList -- and different implementations of those types can use it different ways.  

How is that not multiple formats?

I don't see any future for this change that doesn't involve people getting confused because they see RequestHandler X configured with one syntax in our example configs, but then in some third party plugin project they see RequestHandler Y configured with a completely different syntax and they have no idea what the right way to configure RequestHandler Z is.

bq. But I also see that having ugly configs makes it difficult to be clear about what it does. 

having divergent configs makes it even more difficult.  at least with one ugly syntax once you understand it for one instance, you understand it for all instances.


> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Issue Comment Edited: (SOLR-614) lesser noise in solrconfig.xml

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

noble.paul edited comment on SOLR-614 at 7/4/08 9:51 AM:
---------------------------------------------------------

This patch can automatically make these representations equivalent. This is fully backward compitible. 
* NamedList format: 1
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <lst name="spellchecker">
    <str name="name">default</str>
    <str name="classname">solr.IndexBasedSpellChecker</str>
    <str name="field">spell</str>
    <str name="spellcheckIndexDir">./spellchecker</str>
  </lst>
  <lst name="spellchecker">
    <str name="name">jarowinkler</str>
    <str name="field">lowerfilt</str>
    <str name="distanceMeasure">solr.JaroWinklerDistance</str>
    <str name="spellcheckIndexDir">./spellchecker</str>
  </lst>
</searchComponent>
{code}
* NamedList Format : 2
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <spellchecker>
    <name>default</name>
    <classname>solr.IndexBasedSpellChecker</classname>
    <field>spell</field>
    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
  </spellchecker>
  <spellchecker>
    <name>jarowinkler</name>
    <field>lowerfilt</field>
    <distanceMeasure>solr.JaroWinklerDistance</distanceMeasure>
    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
  </spellchecker>
</searchComponent>
{code}
*NamedList format :3
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <spellchecker name="default" classname="solr.IndexBasedSpellChecker" 
                field="spell" spellcheckIndexDir="./spellchecker"/>
  <spellchecker name="jarowinkler" field="lowerfilt" 
                distanceMeasure="solr.JaroWinklerDistance"  
                spellcheckIndexDir="./spellchecker"/>
</searchComponent>
{code}



      was (Author: noble.paul):
    This patch can automatically make these representations equivalent. This is fully backward compitible. 
* NamedList format: 1
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <lst name="spellchecker">
    <str name="name">default</str>
    <str name="classname">org.apache.solr.spelling.IndexBasedSpellChecker</str>
    <str name="field">spell</str>
    <str name="spellcheckIndexDir">./spellchecker</str>
  </lst>
  <lst name="spellchecker">
    <str name="name">jarowinkler</str>
    <str name="field">lowerfilt</str>
    <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
    <str name="spellcheckIndexDir">./spellchecker</str>
  </lst>
</searchComponent>
{code}
* NamedList Format : 2
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <spellchecker>
    <name>default</name>
    <classname>solr.IndexBasedSpellChecker</classname>
    <field>spell</field>
    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
  </spellchecker>
  <spellchecker>
    <name>jarowinkler</name>
    <field>lowerfilt</field>
    <distanceMeasure>org.apache.lucene.search.spell.JaroWinklerDistance</distanceMeasure>
    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
  </spellchecker>
</searchComponent >
{code}
*NamedList format :3
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <spellchecker name="default" 
                classname="solr.IndexBasedSpellChecker" 
                field="spell" spellcheckIndexDir="./spellchecker"/>
  <spellchecker name="jarowinkler" 
                field="lowerfilt" 
                distanceMeasure="org.apache.lucene.search.spell.JaroWinklerDistance"  
                spellcheckIndexDir="./spellchecker"/>
</searchComponent >
{code}



  
> lesser noise in solrconfig.xml
> ------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>         Attachments: SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

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

Ryan -- I re-read the thread several times before posting this. My understanding was that the -1 was on changing the solrconfig.xml format now for 1.3, please correct me if I'm wrong.

IMHO, this patch does _not_ introduce a new format. The format as the user sees it, is the same one used in many places in solrconfig.xml right now and becomes just a bit more intuitive. The code that developers write to initialize their component also uses the _same_ NamedListInitializedPlugin which we are all familiar with instead of the clunky XPath stuff. Backwards compatibility is retained for both users as well as developers where users can write the old way and developers can still use XPath instead of NamedList for initialization and it all _just works_. If life is made easy for both users and developers and at the same time the changes remain backwards-compatible, I don't see why we should be against it.

2.0 remains distant and getting to a Spring integration will take time. IMHO, that will be a real support problem when users may complain on discovering that they have to write their whole configuration again from scratch, or we provide converters which may fail with custom plugins, or even worse where we may need to support both the old and new formats. I really like the NamedList structure and this issue provides us with the flexibility of having a gradual migration path to a more consistent configuration syntax both for the user as well as for the plugin developer. Any changes to existing configuration will be made post 1.3, no changes right now.

With all due respect, I ask you to reconsider.

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Issue Comment Edited: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

noble.paul edited comment on SOLR-614 at 7/20/08 3:19 AM:
----------------------------------------------------------

If the configuration of a handler is as follows
{code:xml}
<requestHandler name="/foo" class="solr.FooHandler">
  <defaults>
    <name>some-name</name>
    <classname>solr.MyClass</classname>
  </defaults>
</requestHandler>
{code}

The values can be read from the iniArgs as follows
{code:java}
NamedList defaults = (NamedList )initArgs.get("default");
String name = (String)defaults.get("name");
String classname = (String)defaults.get("classname");
{code}

Even attributes can be read as in the following config

{code:xml}
<requestHandler name="/foo" class="solr.FooHandler">
  <defaults name="default" name="somename" classname="solr.MyClass"/>
</requestHandler>
{code}

The values can be read from the iniArgs as follows
{code:java}
NamedList defaults = (NamedList )initArgs.get("default");
String name = (String)defaults.get("@name");
String classname = (String)defaults.get("@classname");
{code}

      was (Author: noble.paul):
    This patch can automatically make these representations equivalent. This is fully backward compitible. 
* NamedList format: 1
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <lst name="spellchecker">
    <str name="name">default</str>
    <str name="classname">solr.IndexBasedSpellChecker</str>
    <str name="field">spell</str>
    <str name="spellcheckIndexDir">./spellchecker</str>
  </lst>
  <lst name="spellchecker">
    <str name="name">jarowinkler</str>
    <str name="field">lowerfilt</str>
    <str name="distanceMeasure">solr.JaroWinklerDistance</str>
    <str name="spellcheckIndexDir">./spellchecker</str>
  </lst>
</searchComponent>
{code}
* NamedList Format : 2
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <spellchecker>
    <name>default</name>
    <classname>solr.IndexBasedSpellChecker</classname>
    <field>spell</field>
    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
  </spellchecker>
  <spellchecker>
    <name>jarowinkler</name>
    <field>lowerfilt</field>
    <distanceMeasure>solr.JaroWinklerDistance</distanceMeasure>
    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
  </spellchecker>
</searchComponent>
{code}
*NamedList format :3
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <spellchecker name="default" classname="solr.IndexBasedSpellChecker" 
                field="spell" spellcheckIndexDir="./spellchecker"/>
  <spellchecker name="jarowinkler" field="lowerfilt" 
                distanceMeasure="solr.JaroWinklerDistance"  
                spellcheckIndexDir="./spellchecker"/>
</searchComponent>
{code}


  
> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Updated: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Shalin Shekhar Mangar updated SOLR-614:
---------------------------------------

    Fix Version/s:     (was: 1.3)

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Assigned: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Shalin Shekhar Mangar reassigned SOLR-614:
------------------------------------------

    Assignee:     (was: Shalin Shekhar Mangar)

Un-assigning myself since I don't see this going anywhere.

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Priority: Trivial
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Updated: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul updated SOLR-614:
----------------------------

    Priority: Trivial  (was: Major)
     Summary: Allow components to read any kind of XML from solrconfig  (was: lesser noise in solrconfig.xml)

There is a lot of resistance to changing the config format at this time . But it would be a nice enhancement if users who write their own handlers are allowed to read an xml of their choice instead of resorting to XPath . 

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617563#action_12617563 ] 

Hoss Man commented on SOLR-614:
-------------------------------

bq. All the changes are under the skin. There will be no changes to the configuration or public API. All the components must stick to the old configuration.So, I hope there is no need to have any confusion

I'm only half certain I understand exactly what's being discussed, so take this comment with a grain of salt...

Even if the code changes dictate that existing components must still use the existing config syntax (I assume because it asks for things like params.get("foo") instead of params.get("@foo") the fact remains that if a single type of plugin (ie: RequestHandler) *can* support multiple config syntaxes the potential exists for people to get very confused ... if we make this change, then someone who is already familiar with the way handlers are configured won't understand the "/replication" example Noble posted -- likewise someone new to Solr who sees that "/replication" example config will have a harder time understanding the 'old' config style for other request handlers.

There is a *lot* of value in maintaining consistency -- even if it's ugly.

Looking ahead two or three moves: adding support for something like this now would also probably make it that much harder to write a "converter" for existing solr config files if/when we switch to Spring or some other Java object wiring/configuration system.  It's a minor problem, but it has occurred to me.



> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Updated: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul updated SOLR-614:
----------------------------

    Comment: was deleted

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Issue Comment Edited: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

noble.paul edited comment on SOLR-614 at 7/27/08 11:06 AM:
-----------------------------------------------------------

bq.perhaps I'm missing something... where/how does this get rid of any XPath? Within a NamedListInitalizedPlugin, the plugin writer does not have access to the Node and can't use it anyway? The plugin writer just has access to a NamedList. 

The NamedList instance contains everything you can add in an xml. so no more XPath needed .
For instance ,the UpdateprocessorChain coud have easily been a NamedListInitializedPlugin . All we need to do is add a method to SolrConfig#getNodeAsNamedList(String xpath). All components can start from there. (of cource the first xpath cannot be avoided)

bq.Yes, the latter is better looking, but considering that folks are already forced to use the former, it seems wrong (and asking for trouble) mix and match.

We are *not* changing anything here. 

{code:xml}
<lst name="defaults"><str name="echoParams">explicit</str></lst>
{code}
is not same as 
{code}
<defaults echoParams="explicit" />
{code}

Unless the component writer explicitly changes his code (which I am not recommending now)


The use case is as follows:
For instance in SOLR-561 I do not wish to keep this configuration
{code:xml}
<requestHandler name="/replication" class="solr.ReplicationHandler" >
    <lst name="master">
        <!--Replicate on 'optimize' it can also be  'commit' -->
        <str name="replicateAfter">commit</str>
        <!--Config files to be to be replicated-->
         <str name="confFiles">schema.xml,stopwords.txt,elevate.xml</str>          
         <str name="snapShootAfter">optimize</str>          
         <str name="snapDir">/user/datadir</str>          
    </lst>
</requestHandler>
{code}

I wish to have a configuration
{code:xml}
<requestHandler name="/replication" class="solr.ReplicationHandler" >
    <master replicateAfter="commit" 
                    confFiles="schema.xml,stopwords.txt,elevate.xml" 
                   snapShootAfter="optimize" snapDir="/user/datadir"/>
</requestHandler>
{code}

But ,it is not possible w/o resorting to xpath . 


with this code change. I can do something like 
{code:java}
NamedList master = (NamedList )initArgs.get("master");
String replicateAfter = (String)master.get("@replicateAfter");
String confFiles= (String)master.get("@confFiles");
String snapDir= (String)master.get("@snapDir");
{code}


This feature is not going to be a part of Solr1.3. But it may be deployed in our organization as an addon feature. 


The second usecase is components like UpdateHandler , UpdateRequestProcessor etc. which already has a syntax that is clean. They can cleanup their java code with no xpath

      was (Author: noble.paul):
    bq.perhaps I'm missing something... where/how does this get rid of any XPath? Within a NamedListInitalizedPlugin, the plugin writer does not have access to the Node and can't use it anyway? The plugin writer just has access to a NamedList. 

The NamedList instance contains everything you can add in an xml. so no more XPath needed .
For instance ,the UpdateprocessorChain coud have easily been a NamedListInitializedPlugin . All we need to do is add a method to SolrConfig#getNodeAsNamedList(String xpath). All components can start from there. (of cource the first xpath cannot be avoided)

bq.Yes, the latter is better looking, but considering that folks are already forced to use the former, it seems wrong (and asking for trouble) mix and match.

We are *not* changing anything here. 

{code:xml}
<lst name="defaults"><str name="echoParams">explicit</str></lst>
{code}
is not same as 
{code}
<defaults echoParams="explicit" />
{code}

Unless the component writer explicitly changes his code (which I am not recommending now)
The use case is as follows

For instance in SOLR-561 I do not wish to keep this configuration
{code:xml}
<requestHandler name="/replication" class="solr.ReplicationHandler" >
    <lst name="master">
        <!--Replicate on 'optimize' it can also be  'commit' -->
        <str name="replicateAfter">commit</str>
        <!--Config files to be to be replicated-->
         <str name="confFiles">schema.xml,stopwords.txt,elevate.xml</str>          
         <str name="snapShootAfter">optimize</str>          
         <str name="snapDir">/user/datadir</str>          
    </lst>
</requestHandler>
{code}

I wish to have a configuration
{code:xml}
<requestHandler name="/replication" class="solr.ReplicationHandler" >
    <master replicateAfter="commit" 
                    confFiles="schema.xml,stopwords.txt,elevate.xml" 
                   snapShootAfter="optimize" snapDir="/user/datadir"/>
</requestHandler>
{code}

But ,it is not possible w/o resorting to xpath . This is not going to be a part of Solr1.3. But it may be deployed in our organization as an addon feature. 

The second usecase is components like UpdateHandler , UpdateRequestProcessor etc. which already has a syntax that is clean. They can cleanup their java code with no xpath
  
> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Assigned: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Shalin Shekhar Mangar reassigned SOLR-614:
------------------------------------------

    Assignee: Shalin Shekhar Mangar

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615122#action_12615122 ] 

Ryan McKinley commented on SOLR-614:
------------------------------------

If I understood the discussion on the dev list properly, we would put off any syntax changes until 2.0, and then hopefully use some configuration standards that we don't maintain (spring)

http://www.nabble.com/lesser-noise-in-solrconfig.xml-td18253180.html#a18253180

Yes, the new format is cleaner and more clear, but I fear compatibility/clarity issues with existing 1.x setups and multiple syntaxs for the same thing seems problematic.

I think we should mark this as "won't fix", and save the configuration cleanup till we can do it well -- ie, spring.

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Updated: (SOLR-614) lesser noise in solrconfig.xml

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

Noble Paul updated SOLR-614:
----------------------------

    Attachment: SOLR-614.patch

This patch can automatically make these representations equivalent. This is fully backward compitible. 
* NamedList format: 1
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <lst name="spellchecker">
    <str name="name">default</str>
    <str name="classname">org.apache.solr.spelling.IndexBasedSpellChecker</str>
    <str name="field">spell</str>
    <str name="spellcheckIndexDir">./spellchecker</str>
  </lst>
  <lst name="spellchecker">
    <str name="name">jarowinkler</str>
    <str name="field">lowerfilt</str>
    <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
    <str name="spellcheckIndexDir">./spellchecker</str>
  </lst>
</searchComponent>
{code}
* NamedList Format : 2
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <spellchecker>
    <name>default</name>
    <classname>solr.IndexBasedSpellChecker</classname>
    <field>spell</field>
    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
  </spellchecker>
  <spellchecker>
    <name>jarowinkler</name>
    <field>lowerfilt</field>
    <distanceMeasure>org.apache.lucene.search.spell.JaroWinklerDistance</distanceMeasure>
    <spellcheckIndexDir>./spellchecker</spellcheckIndexDir>
  </spellchecker>
</searchComponent >
{code}
*NamedList format :3
{code:xml}
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <spellchecker name="default" 
                classname="solr.IndexBasedSpellChecker" 
                field="spell" spellcheckIndexDir="./spellchecker"/>
  <spellchecker name="jarowinkler" 
                field="lowerfilt" 
                distanceMeasure="org.apache.lucene.search.spell.JaroWinklerDistance"  
                spellcheckIndexDir="./spellchecker"/>
</searchComponent >
{code}




> lesser noise in solrconfig.xml
> ------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>         Attachments: SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Updated: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul updated SOLR-614:
----------------------------

    Attachment: SOLR-614.patch

The new patch for the changes proposed

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Updated: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul updated SOLR-614:
----------------------------

    Attachment: SOLR-614.patch

refactored

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

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

I think the current scope is reasonable. This limited scope makes a cleaner config possible but makes no changes to the public configuration as it stands now. Future (Solr 1.4+) and custom user components can use the cleaner configuration syntax if they choose to do so. We can document in the wiki that a cleaner syntax is available for component writers if they so desire. Future versions of the existing components which use the XPath based parsing currently, can switch to using this code for a cleaner and consistent implementation, if we so desire.

Thoughts?

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617423#action_12617423 ] 

Erik Hatcher commented on SOLR-614:
-----------------------------------

I still think this is an unnecessary addition that has the potential to be confusing.  Even though the current config stuff is ugly to navigate, it is only one way that will be easier to support.

I don't want to thwart your efforts though.  -0

I'd really prefer this be taken to a post-1.3 commit at the very least though, so we can flesh out config syntax and infrastructure a bit more.

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul commented on SOLR-614:
---------------------------------

bq.This comment doesn't make sense to me ... we have one syntax right now, this issue adds an arbitrary number of new syntaxes for any type of plugin whose init() method takes a NamedList - and different implementations of those types can use it different ways.

users do not f\differentiate between namedlist format and simple xml format. according to them it is xml. It is only we who see it differently. So every component has its own different configuration. As long as one component consistently uses one configuration ,I guess we are fine. I have never seen users complaining about the inconsistency between updatehandler/requesthandler config. The fact is they don't care. According to them, an updatehandler and a requesthandler1 and requesthandler2 are 3 different components needing three different configurations. 

for instance compare between spellchecker and dismax. Though they have similar formats uses may never notice it because they have totally different configuration. I am sure there is no cause of a confusion because users never compare these two.

There are certain well known conventions which are important. such as defaults , invariants etc in a requesthandler. It makes sense to  have consistency in those things. 

As we start building more and more complex handlers this format can become a real millstone around our neck. We must not sacrifice simplicity of future components because of a few components we already have.





> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Updated: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul updated SOLR-614:
----------------------------

    Comment: was deleted

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617318#action_12617318 ] 

Ryan McKinley commented on SOLR-614:
------------------------------------

perhaps I'm missing something...  where/how does this get rid of any XPath?  Within a NamedListInitalizedPlugin, the plugin writer does not have access to the Node and can't use it anyway?  The plugin writer just has access to a NamedList.

What I see is that this modifies/augments how we parse NamedLists, adding two key features:
1. <a>value</a> == <str name="a">value</str>
2. <node a="value" /> -- adds '@a'=value to the NamedList 'node'

Perhaps I'm just reluctant to muck with a format that despite its awkwardness works, and is consistent across (most) plugins.  To me it seems wrong that I would need to initialize most things with: {code:xml}<lst name="defaults"><str name="echoParams">explicit</str></lst>{code} but *perhaps* other plugins would need: 
{code:xml}<defaults echoParams="explicit" />{code}  Yes, the latter is better looking, but considering that folks are already forced to use the former, it seems wrong (and asking for trouble) mix and match.  

NamedList isn't an XML standard, but in 1.x we can't get rid of it, so I think we should just deal with it consistently and in 2.x make sure we fix it.


> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

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

Just to elaborate on the UpdateRequestProcessor use-case, right now we have modified SolrCore to add a method loadUpdateProcessorChains which has quite a bit of XPath parsing to create a NamedList which is passed to the UpdateRequestProcessorFactory. With this patch, the chain can just implement NamedListInitializedPlugin and the whole bit of parsing will be done automatically.

So the whole code in SolrCore#loadUpdateProcessorChains will look like this:
{code}
List<NamedList> initConfigs = solrConfig.getAllNodesAsNamedList("updateRequestProcessorChain");
    for (NamedList list : initConfigs)  {
      UpdateRequestProcessorChain chain = new UpdateRequestProcessorChain();
      chain.init(list);
      map.put((String)list.get("@name"), chain);
    }
{code}

The chain will have an init method like this:
{code}
public void init(NamedList args) {
    List<NamedList> processors = args.getAll("processor");
    for (NamedList processor : processors)  {
      UpdateRequestProcessorFactory p = (UpdateRequestProcessorFactory)core.getResourceLoader().newInstance((String)processor.get("@class"));
      p.init(processor);
    }
  }
{code}

So the chain can create all processors inside it rather than SolrCore creating processors and passing them into a chain constructor.

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

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

Eric -- One reason that I'm so +1 on it is that if it does not go into 1.3, all custom (internal) plugins we write for 1.3 will be stuck with the ugly config format or clunky xpath code for at least the next six to eight months until we have another release.

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Reopened: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Shalin Shekhar Mangar reopened SOLR-614:
----------------------------------------


> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul commented on SOLR-614:
---------------------------------

bq.perhaps I'm missing something... where/how does this get rid of any XPath? Within a NamedListInitalizedPlugin, the plugin writer does not have access to the Node and can't use it anyway? The plugin writer just has access to a NamedList. 

The NamedList instance contains everything you can add in an xml. so no more XPath needed .
For instance ,the UpdateprocessorChain coud have easily been a NamedListInitializedPlugin . All we need to do is add a method to SolrConfig#getNodeAsNamedList(String xpath). All components can start from there. (of cource the first xpath cannot be avoided)

bq.Yes, the latter is better looking, but considering that folks are already forced to use the former, it seems wrong (and asking for trouble) mix and match.

We are *not* changing anything here. 

{code:xml}
<lst name="defaults"><str name="echoParams">explicit</str></lst>
{code}
is not same as 
{code}
<defaults echoParams="explicit" />
{code}

Unless the component writer explicitly changes his code (which I am not recommending now)
The use case is as follows

For instance in SOLR-561 I do not wish to keep this configuration
{code:xml}
<requestHandler name="/replication" class="solr.ReplicationHandler" >
    <lst name="master">
        <!--Replicate on 'optimize' it can also be  'commit' -->
        <str name="replicateAfter">commit</str>
        <!--Config files to be to be replicated-->
         <str name="confFiles">schema.xml,stopwords.txt,elevate.xml</str>          
         <str name="snapShootAfter">optimize</str>          
         <str name="snapDir">/user/datadir</str>          
    </lst>
</requestHandler>
{code}

I wish to have a configuration
{code:xml}
<requestHandler name="/replication" class="solr.ReplicationHandler" >
    <master replicateAfter="commit" 
                    confFiles="schema.xml,stopwords.txt,elevate.xml" 
                   snapShootAfter="optimize" snapDir="/user/datadir"/>
</requestHandler>
{code}

But ,it is not possible w/o resorting to xpath . This is not going to be a part of Solr1.3. But it may be deployed in our organization as an addon feature. 

The second usecase is components like UpdateHandler , UpdateRequestProcessor etc. which already has a syntax that is clean. They can cleanup their java code with no xpath

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


Re: [jira] Resolved: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
I've rolled this one back anyway. Will re-open the issue and remove 1.3 fix
version though I still do not understand the opposition to a backwards
compatible change which can increase usability.

On Wed, Aug 6, 2008 at 9:15 PM, Shalin Shekhar Mangar <
shalinmangar@gmail.com> wrote:

> Grant,
>
> I think I missed your comment on that thread, sorry about that. Should have
> read the new messages before committing this. Reading Eric's comment, he
> seemed ok with it.
>
> Three reasons:
> 1. It does not make any user-facing changes in 1.3 -- no configuration is
> touched at all. This was one of the major support issues.
> 2. We were all in agreement that the current format is a bit ugly. This
> issue can make a better config "possible". We should definitely re-think the
> configuration post 1.3 but we should not force plugin developers to use an
> ugly format for the next 1 year (till spring or whatever comes along) if
> something can be done about it so easily.
> 3. I removed the attribute reading for normal NamedList parsing so that
> existing code is not affected at all. A plugin using the <lst
> name="defaults"> section cannot use the namedList.get("@name") syntax
> anymore. Therefore, old configuration looks and feels like the old one in
> the code.
>
> I wasn't sure if a -0 is the same as a -1 but I'll roll this back if I made
> a mistake in handling this in the correct fashion.
>
> On Wed, Aug 6, 2008 at 8:51 PM, Grant Ingersoll <gs...@apache.org>wrote:
>
>> Shalin,
>>
>> Why was this committed?  There were numerous opinions suggesting otherwise
>> that weren't addressed, including most recently on the Solr 1.3 release date
>> thread.  I think it should be rolled back until there is a consensus amongst
>> the committers, which there does not appear to be.
>>
>>
>> -Grant
>>
>>
>> On Aug 6, 2008, at 11:06 AM, Shalin Shekhar Mangar (JIRA) wrote:
>>
>>
>>>    [
>>> https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>>>  ]
>>>
>>> Shalin Shekhar Mangar resolved SOLR-614.
>>> ----------------------------------------
>>>
>>>   Resolution: Fixed
>>>
>>> Committed revision 683288 after removing the attribute reading for plain
>>> NamedList so that existing usage is not changed in any way.
>>>
>>> Thanks Noble!
>>>
>>>
>>>  Allow components to read any kind of XML from solrconfig
>>>> --------------------------------------------------------
>>>>
>>>>               Key: SOLR-614
>>>>               URL: https://issues.apache.org/jira/browse/SOLR-614
>>>>           Project: Solr
>>>>        Issue Type: Improvement
>>>>  Affects Versions: 1.3
>>>>          Reporter: Noble Paul
>>>>          Assignee: Shalin Shekhar Mangar
>>>>          Priority: Trivial
>>>>           Fix For: 1.3
>>>>
>>>>       Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch,
>>>> SOLR-614.patch
>>>>
>>>>
>>>> All the components initialized by Solr have an init(NamedList args)
>>>> initializer. This leads us to writing the configuration needed for the
>>>> component in the NamedList xml format. People familiar with Solr may know
>>>> the format but most of what is written is noise than information. For users
>>>> who are not familiar w/ the format find it too difficult to understand why
>>>> they have to write it this way. Moreover , it is not a very efficient way to
>>>> configure .
>>>>
>>>
>>> --
>>> This message is automatically generated by JIRA.
>>> -
>>> You can reply to this email to add a comment to the issue online.
>>>
>>>
>> --------------------------
>> Grant Ingersoll
>> http://www.lucidimagination.com
>>
>> Lucene Helpful Hints:
>> http://wiki.apache.org/lucene-java/BasicsOfPerformance
>> http://wiki.apache.org/lucene-java/LuceneFAQ
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>



-- 
Regards,
Shalin Shekhar Mangar.

Re: [jira] Resolved: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Aug 6, 2008 at 11:41 PM, Chris Hostetter
<ho...@fucit.org>wrote:

>
> : Please accept my apologies. I will practice more restraint in the future.
>
> Absolutely no need to apologize ... You made a judgement call that Grant
> or I wouldn't have made (but that doesn't make it wrong) and we were
> sharing our perspectives (which aren't neccessarily right).
>
> Don't be afraid to commit code if you think it's really the right thing to
> do -- just be prepared for others to question your decision if there isn't
> clear and obvious concencus in favor of the code.


Very relieved to read that :)


>
>
> (We aren't doing heart transplants here -- we can always put the Genie
> back in the bottle)
>
>
Right, onto the next issue, then :)

-- 
Regards,
Shalin Shekhar Mangar.

Re: [jira] Resolved: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by Chris Hostetter <ho...@fucit.org>.
: Please accept my apologies. I will practice more restraint in the future.

Absolutely no need to apologize ... You made a judgement call that Grant 
or I wouldn't have made (but that doesn't make it wrong) and we were  
sharing our perspectives (which aren't neccessarily right).

Don't be afraid to commit code if you think it's really the right thing to 
do -- just be prepared for others to question your decision if there isn't 
clear and obvious concencus in favor of the code.

(We aren't doing heart transplants here -- we can always put the Genie 
back in the bottle)


-Hoss


Re: [jira] Resolved: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Aug 6, 2008 at 10:50 PM, Chris Hostetter
<ho...@fucit.org>wrote:

> http://www.apache.org/foundation/voting.html
>
> You essentially had two people saying "yes"; two people saying "I won't
> get in the way, but I'd rather we didn't do this"; and one guy (me) who
> didn't specificly "vote" but did express a lot of concern that this will
> introduce confusion ... that doesn't really sound like a lot of support.
>
> If I'd been in your shoes, I wouldn't have commited.  Anytime you have
> multiple committers who are concerned about the impacts of something, it's
> probably wise to discuss some more.
>
>
Please accept my apologies. I will practice more restraint in the future.

Let us brainstorm on better ways to address the core issues around
configuration and ease-of-use post 1.3

-- 
Regards,
Shalin Shekhar Mangar.

Re: [jira] Resolved: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by Chris Hostetter <ho...@fucit.org>.
: 1. It does not make any user-facing changes in 1.3 -- no configuration is
: touched at all. This was one of the major support issues.

But it does affect users ... it opens them up to start seeing plugin 
developers using new/different syntaxes they aren't familiar with -- 
syntaxes that will definitely confuse people and increase the number of 
questions about how to configure things.

: configuration post 1.3 but we should not force plugin developers to use an
: ugly format for the next 1 year (till spring or whatever comes along) if
: something can be done about it so easily.

As I said in the email that spawned that Jira issue -- Plugin writers are 
free to load their own custom config files containing more complicated 
information -- those files can be any syntax they want, and by being 
seperate files it will not suprise people that they are a different 
syntax, and it will be clear what they should ask questions about: "I'm 
looking at the FooRequestHandler config file, if i don't understnad it i 
should ask about the FooRequestHandler config file syntax"  when you start 
allowing drasticly differnet syntaxes for different instances (FooRequestHandler vs 
BarRequestHandler) of the type (RequestHandler) directly in solrconfig.xml 
then users don't really know what to ask about ... the expectation is that 
within the solrconfig.xml the syntax for configuring RequestHandler X is 
the same as for RequestHandler Y ... the names/values of the options may 
be differnet, but the syntax should be the same

: I wasn't sure if a -0 is the same as a -1 but I'll roll this back if I made
: a mistake in handling this in the correct fashion.

http://www.apache.org/foundation/voting.html

You essentially had two people saying "yes"; two people saying "I won't 
get in the way, but I'd rather we didn't do this"; and one guy (me) who 
didn't specificly "vote" but did express a lot of concern that this will 
introduce confusion ... that doesn't really sound like a lot of support.

If I'd been in your shoes, I wouldn't have commited.  Anytime you have 
multiple committers who are concerned about the impacts of something, it's 
probably wise to discuss some more.



-Hoss


Re: [jira] Resolved: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Grant,

I think I missed your comment on that thread, sorry about that. Should have
read the new messages before committing this. Reading Eric's comment, he
seemed ok with it.

Three reasons:
1. It does not make any user-facing changes in 1.3 -- no configuration is
touched at all. This was one of the major support issues.
2. We were all in agreement that the current format is a bit ugly. This
issue can make a better config "possible". We should definitely re-think the
configuration post 1.3 but we should not force plugin developers to use an
ugly format for the next 1 year (till spring or whatever comes along) if
something can be done about it so easily.
3. I removed the attribute reading for normal NamedList parsing so that
existing code is not affected at all. A plugin using the <lst
name="defaults"> section cannot use the namedList.get("@name") syntax
anymore. Therefore, old configuration looks and feels like the old one in
the code.

I wasn't sure if a -0 is the same as a -1 but I'll roll this back if I made
a mistake in handling this in the correct fashion.

On Wed, Aug 6, 2008 at 8:51 PM, Grant Ingersoll <gs...@apache.org> wrote:

> Shalin,
>
> Why was this committed?  There were numerous opinions suggesting otherwise
> that weren't addressed, including most recently on the Solr 1.3 release date
> thread.  I think it should be rolled back until there is a consensus amongst
> the committers, which there does not appear to be.
>
>
> -Grant
>
>
> On Aug 6, 2008, at 11:06 AM, Shalin Shekhar Mangar (JIRA) wrote:
>
>
>>    [
>> https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>>  ]
>>
>> Shalin Shekhar Mangar resolved SOLR-614.
>> ----------------------------------------
>>
>>   Resolution: Fixed
>>
>> Committed revision 683288 after removing the attribute reading for plain
>> NamedList so that existing usage is not changed in any way.
>>
>> Thanks Noble!
>>
>>
>>  Allow components to read any kind of XML from solrconfig
>>> --------------------------------------------------------
>>>
>>>               Key: SOLR-614
>>>               URL: https://issues.apache.org/jira/browse/SOLR-614
>>>           Project: Solr
>>>        Issue Type: Improvement
>>>  Affects Versions: 1.3
>>>          Reporter: Noble Paul
>>>          Assignee: Shalin Shekhar Mangar
>>>          Priority: Trivial
>>>           Fix For: 1.3
>>>
>>>       Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch,
>>> SOLR-614.patch
>>>
>>>
>>> All the components initialized by Solr have an init(NamedList args)
>>> initializer. This leads us to writing the configuration needed for the
>>> component in the NamedList xml format. People familiar with Solr may know
>>> the format but most of what is written is noise than information. For users
>>> who are not familiar w/ the format find it too difficult to understand why
>>> they have to write it this way. Moreover , it is not a very efficient way to
>>> configure .
>>>
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com
>
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
>
>
>
>
>
>
>
>


-- 
Regards,
Shalin Shekhar Mangar.

Re: [jira] Resolved: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by Grant Ingersoll <gs...@apache.org>.
Shalin,

Why was this committed?  There were numerous opinions suggesting  
otherwise that weren't addressed, including most recently on the Solr  
1.3 release date thread.  I think it should be rolled back until there  
is a consensus amongst the committers, which there does not appear to  
be.


-Grant

On Aug 6, 2008, at 11:06 AM, Shalin Shekhar Mangar (JIRA) wrote:

>
>     [ https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel 
>  ]
>
> Shalin Shekhar Mangar resolved SOLR-614.
> ----------------------------------------
>
>    Resolution: Fixed
>
> Committed revision 683288 after removing the attribute reading for  
> plain NamedList so that existing usage is not changed in any way.
>
> Thanks Noble!
>
>
>> Allow components to read any kind of XML from solrconfig
>> --------------------------------------------------------
>>
>>                Key: SOLR-614
>>                URL: https://issues.apache.org/jira/browse/SOLR-614
>>            Project: Solr
>>         Issue Type: Improvement
>>   Affects Versions: 1.3
>>           Reporter: Noble Paul
>>           Assignee: Shalin Shekhar Mangar
>>           Priority: Trivial
>>            Fix For: 1.3
>>
>>        Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch,  
>> SOLR-614.patch
>>
>>
>> All the components initialized by Solr have an init(NamedList args)  
>> initializer. This leads us to writing the configuration needed for  
>> the component in the NamedList xml format. People familiar with  
>> Solr may know the format but most of what is written is noise than  
>> information. For users who are not familiar w/ the format find it  
>> too difficult to understand why they have to write it this way.  
>> Moreover , it is not a very efficient way to configure .
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>

--------------------------
Grant Ingersoll
http://www.lucidimagination.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ








[jira] Resolved: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Shalin Shekhar Mangar resolved SOLR-614.
----------------------------------------

    Resolution: Fixed

Committed revision 683288 after removing the attribute reading for plain NamedList so that existing usage is not changed in any way.

Thanks Noble!


> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617214#action_12617214 ] 

Ryan McKinley commented on SOLR-614:
------------------------------------

-1

As discussed elsewhere, I'm against changing the NamedList config code.  I agree it is ugly, but at least it is consistent.  In 2.0, this should all be revisited, so I see no reason to introduce a new possible format into the mix...  even if it is only used for new things...

Judging from the discussion on the related thread, I think Erik and Hoss are also -1 (but let them speak for themselves)

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul commented on SOLR-614:
---------------------------------

bq.I still think this is an unnecessary addition that has the potential to be confusing. Even though the current config stuff is ugly to navigate, it is only one way that will be easier to support. 
All the changes are under the skin. There will be no changes to the configuration or public API. All the components *must*  stick to the old configuration.So, I hope there is no need to have any confusion

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617674#action_12617674 ] 

Ryan McKinley commented on SOLR-614:
------------------------------------

As i have said, I think consistency is a good thing and we will hopefully get out of the custom config format business in 2.0.  But I also see that having ugly configs makes it difficult to be clear about what it does.  (I remember struggling to figure out that lst != 1st)  Ugly configs are a big deal, so I hate to throw sticks at the endeavor...  I imagine any translation to a new format would involve reading it and then outputting the relevant configs rather then trying some sort of text manipulation.  With that in mind, it probably makes little difference on that front.

So I'll change my vote to -0, and I'll let you all sort out what should happen...



> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Updated: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Shalin Shekhar Mangar updated SOLR-614:
---------------------------------------

    Attachment: SOLR-614.patch

Adds SolrConfig#getAllNodesAsNamedList and SolrConfig#getNodeAsNamedList helper methods to further simplify parsing code.

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Updated: (SOLR-614) lesser noise in solrconfig.xml

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

Noble Paul updated SOLR-614:
----------------------------

    Fix Version/s: 1.3

It would be better to do it before 1.3 because this impacts the way users write their solrconfig files. Once 1.3 is released it is hard to change the configuration

> lesser noise in solrconfig.xml
> ------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul commented on SOLR-614:
---------------------------------

The scope of this bug is not same as 

http://www.nabble.com/lesser-noise-in-solrconfig.xml-td18253180.html#a18253180

I descoped it. 
It *WILL NOT* make any changes to the _solrconfig.xml_. The intend is to enable new components to take advantage of a flexible format. When I say new components the components written by users after 1.3 (intended to run on top of 1.3)

We use our own custom components in our organization. I am sure there are a lot of other users who do that.  There is no harm in enabling them to choose their format (if they wish to do so) 

If we plan to change the configuration in any which way in the future , how can this affect any of our plans?

The implementation does not have to be the same (or even the scope) . But we should allow more flexibility in the API for component writers

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Commented: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

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

I'd like to commit this in a day or two if there are no objections.

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Issue Comment Edited: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

noble.paul edited comment on SOLR-614 at 7/26/08 10:48 PM:
-----------------------------------------------------------

This one change has the potential to cleanup a lot of ugly XPath reading in our code. The intend here is to cleanup our internal code if needed. In many places (eg:updateHandler , SOLR-660 etc) we have a simple format but the parsing code is still ugly. 

Another interesting point I observe in that many of our components are not _NamedListInitializedPlugin_ Just because of this one reason. They will have to stick to this ugly format. So what happens is, components take in an XML Node to parse their custom XML

One point that all of us accept is that the current format is ugly. Moreover , the NameList format is no XML standard . It is just *another* response format for SOLR output  . My request is let us *please* not impose a weird format on component writers . Let us give choice to component writers who use Solr1.3 release as their base. The longer we delay this harder it gets to change this.




      was (Author: noble.paul):
    This one change has the potential to cleanup a lot of ugly XPath reading in our code. The intend here is to cleanup our internal code if needed. In many places (eg:updateHandler , SOLR-660 etc) we have a simple format but the parsing code is still ugly. 

  
> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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


[jira] Closed: (SOLR-614) Allow components to read any kind of XML from solrconfig

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

Noble Paul closed SOLR-614.
---------------------------

    Resolution: Won't Fix

> Allow components to read any kind of XML from solrconfig
> --------------------------------------------------------
>
>                 Key: SOLR-614
>                 URL: https://issues.apache.org/jira/browse/SOLR-614
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Noble Paul
>            Priority: Trivial
>         Attachments: SOLR-614.patch, SOLR-614.patch, SOLR-614.patch, SOLR-614.patch
>
>
> All the components initialized by Solr have an init(NamedList args) initializer. This leads us to writing the configuration needed for the component in the NamedList xml format. People familiar with Solr may know the format but most of what is written is noise than information. For users who are not familiar w/ the format find it too difficult to understand why they have to write it this way. Moreover , it is not a very efficient way to configure .

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