On 3/2/2018 8:27 AM, Zheng Lin Edwin Yeo wrote:
Are we able to rename the folder name like solr-webapp or the names
like solr-jetty-context.xml to the customised name like my-webapp and
my-jetty-context.xml?
I'm currently using Solr 6.5.1, and will upgrade to Solr 7.2.1 soon.
When people start wanting to customize internal details to this level, I
seriously have to ask "why?" The dev team has spent a lot of time and
effort coming up with these configurations. They are not designed to be
customizable. Some of them certainly CAN be customized, with a lot of
manual work.
These particular questions involve Jetty, not so much Solr. From what I
can tell, the solr-jetty-context.xml file can be renamed to anything,
it's the fact that it's in the "contexts" directory that makes Jetty
read it. I do not know whether it needs an xml extension ... I would
preserve that if it were me.
The "solr-webapp" directory location is defined within the
solr-jetty-context.xml file, so if you change that, you're going to need
to edit the context file in order to keep Solr working. The scripts
included with Solr have this path hardcoded, and for that reason, Solr
probably won't even start without manual script edits if the webapp
directory is changed.
Anticipating another question you might have: Another piece of
information in solr-jetty-context.xml is the context path -- set to
"/solr" -- this is the first part of the URL path on all API calls. You
can change this, and Solr itself will still work properly, but a lot of
things have this path hard-coded (like the scripts, certain Java
libraries like SolrCli, and the admin UI), so those features will break
unless you manually edit them for the new path.
Thanks,
Shawn