You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Erick Erickson <er...@gmail.com> on 2013/08/30 18:42:55 UTC

So do we even need solr.xml any more?

As an experiment while writing a test, I played around with solr.xml and
defined it this way:
<solr/>

Starts up and runs just fine in core discovery mode since it defaults to
core discovery mode in the absence of a <cores> tag. Of course all the
defaults are used and you better have core.properties files in the right
place and all that, but...

So does it make sense to officially support a "no solr.xml" option?
Removing solr.xml entirely barfs with "solr.xml does not exist in
/Users/Erick/apache/trunk/solr/example/solr/solr.xml cannot start Solr" and
an empty solr.xml results in an XML parsing error.

I don't have strong feelings either way, but thought I'd throw it out for
people to kick around.

Worth a JIRA?

Erick

Re: So do we even need solr.xml any more?

Posted by Erick Erickson <er...@gmail.com>.
No, 4x still works without it, so there's nothing really to be done. More
an observation that it's possible to be _really_ minimal....

Erick


On Fri, Aug 30, 2013 at 1:44 PM, Mark Miller <ma...@gmail.com> wrote:

> I think solr.xml should be required. We already had this functionality for
> back compat and it's confusing.
>
> I don't think there are any benefits to allowing Solr to run without it.
>
> However, 4.x should still work without - if that has changed, that is a
> problem and it should be fixed. Only 5.x should require it.
>
> - Mark
>
> On Aug 30, 2013, at 12:42 PM, Erick Erickson <er...@gmail.com>
> wrote:
>
> > As an experiment while writing a test, I played around with solr.xml and
> defined it this way:
> > <solr/>
> >
> > Starts up and runs just fine in core discovery mode since it defaults to
> core discovery mode in the absence of a <cores> tag. Of course all the
> defaults are used and you better have core.properties files in the right
> place and all that, but...
> >
> > So does it make sense to officially support a "no solr.xml" option?
> Removing solr.xml entirely barfs with "solr.xml does not exist in
> /Users/Erick/apache/trunk/solr/example/solr/solr.xml cannot start Solr" and
> an empty solr.xml results in an XML parsing error.
> >
> > I don't have strong feelings either way, but thought I'd throw it out
> for people to kick around.
> >
> > Worth a JIRA?
> >
> > Erick
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: So do we even need solr.xml any more?

Posted by Mark Miller <ma...@gmail.com>.
I think solr.xml should be required. We already had this functionality for back compat and it's confusing.

I don't think there are any benefits to allowing Solr to run without it.

However, 4.x should still work without - if that has changed, that is a problem and it should be fixed. Only 5.x should require it.

- Mark

On Aug 30, 2013, at 12:42 PM, Erick Erickson <er...@gmail.com> wrote:

> As an experiment while writing a test, I played around with solr.xml and defined it this way:
> <solr/>
> 
> Starts up and runs just fine in core discovery mode since it defaults to core discovery mode in the absence of a <cores> tag. Of course all the defaults are used and you better have core.properties files in the right place and all that, but...
> 
> So does it make sense to officially support a "no solr.xml" option? Removing solr.xml entirely barfs with "solr.xml does not exist in /Users/Erick/apache/trunk/solr/example/solr/solr.xml cannot start Solr" and an empty solr.xml results in an XML parsing error.
> 
> I don't have strong feelings either way, but thought I'd throw it out for people to kick around. 
> 
> Worth a JIRA?
> 
> Erick


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: So do we even need solr.xml any more?

Posted by Erick Erickson <er...@gmail.com>.
I'm suggesting that the existence of solr.xml is unnecessary. Kind of like
we used to do, if we
don't find one in solrHome, just use <solr/>. It would also be reasonable
to allow an empty file.
But no, I'm not suggesting that we move solr.xml anywhere or move it to a
properties file or
anything else. I was just a bit surprised that we don't need anything in
that file and thought it
would be worth getting people's opinions.

bq: BTW, it would be nice to do the same for solrconfig.xml. And
core.properties, while you’re at it.

You have an exaggerated sense of my ambition level <G>


On Fri, Aug 30, 2013 at 12:56 PM, Jack Krupansky <ja...@basetechnology.com>wrote:

>   Is your question about whether the empty file should be needed if the
> user accepts all defaults for SolrCloud, logging, the shard handler
> factory, and the other defaults for the top-level values, or are you
> suggesting an alternate location for all of those values if non-defaults
> are desired? Or, maybe to switch to a solr.properties file since the
> structure is now rather flat? (Although the shard handler factory has a
> structured plugin configuration.)
>
> The one advantage of requiring the file is to catch typos like naming the
> file sol.xml or Solr.xml (for non-Windows, non-Mac) or solar.xml. Or even
> solr.properties.
>
> Otherwise, I’m content to have the file be optional provided that the
> defaults are all sensible.
>
> BTW, it would be nice to do the same for solrconfig.xml. And
> core.properties, while you’re at it.
>
> -- Jack Krupansky
>
>  *From:* Erick Erickson <er...@gmail.com>
> *Sent:* Friday, August 30, 2013 12:42 PM
> *To:* dev@lucene.apache.org
> *Subject:* So do we even need solr.xml any more?
>
>  As an experiment while writing a test, I played around with solr.xml and
> defined it this way:
> <solr/>
>
> Starts up and runs just fine in core discovery mode since it defaults to
> core discovery mode in the absence of a <cores> tag. Of course all the
> defaults are used and you better have core.properties files in the right
> place and all that, but...
>
> So does it make sense to officially support a "no solr.xml" option?
> Removing solr.xml entirely barfs with "solr.xml does not exist in
> /Users/Erick/apache/trunk/solr/example/solr/solr.xml cannot start Solr" and
> an empty solr.xml results in an XML parsing error.
>
> I don't have strong feelings either way, but thought I'd throw it out for
> people to kick around.
>
> Worth a JIRA?
>
> Erick
>

Re: So do we even need solr.xml any more?

Posted by Jack Krupansky <ja...@basetechnology.com>.
Is your question about whether the empty file should be needed if the user accepts all defaults for SolrCloud, logging, the shard handler factory, and the other defaults for the top-level values, or are you suggesting an alternate location for all of those values if non-defaults are desired? Or, maybe to switch to a solr.properties file since the structure is now rather flat? (Although the shard handler factory has a structured plugin configuration.)

The one advantage of requiring the file is to catch typos like naming the file sol.xml or Solr.xml (for non-Windows, non-Mac) or solar.xml. Or even solr.properties.

Otherwise, I’m content to have the file be optional provided that the defaults are all sensible.

BTW, it would be nice to do the same for solrconfig.xml. And core.properties, while you’re at it.

-- Jack Krupansky

From: Erick Erickson 
Sent: Friday, August 30, 2013 12:42 PM
To: dev@lucene.apache.org 
Subject: So do we even need solr.xml any more?

As an experiment while writing a test, I played around with solr.xml and defined it this way: 
<solr/>

Starts up and runs just fine in core discovery mode since it defaults to core discovery mode in the absence of a <cores> tag. Of course all the defaults are used and you better have core.properties files in the right place and all that, but...

So does it make sense to officially support a "no solr.xml" option? Removing solr.xml entirely barfs with "solr.xml does not exist in /Users/Erick/apache/trunk/solr/example/solr/solr.xml cannot start Solr" and an empty solr.xml results in an XML parsing error.

I don't have strong feelings either way, but thought I'd throw it out for people to kick around. 

Worth a JIRA?


Erick