You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Gian Maria Ricci <al...@nablasoft.com> on 2013/03/18 18:47:20 UTC
how to deploy customization in solr that requires dependency
Hi to everyone,
I want to deploy a custom filter developed in java to Solr4, my problem is
that it requires to access Sql Server, so it depends from sqljdbc4.jar, but
I got a java.lang.ClassNotFoundException:
com.microsoft.sqlserver.jdbc.SQLServerDriver
I've copied the sqljdbc.jar file in the c:\tomcat\lib directory but it does
not work. So I've modified solrconfig.xml to load sqljdbc4.jar and now it
works, but I think that is a bettere solution to configure in some base
Tomcat directory instead in solrcfg.xml file of all cores. My question is,
where I can configure Tomcat to make sqljdbc4.jar available to every
customization filter in solar without referencing it directly in
solrcfg.xml?
I'm a .NET developer, so I'm not really familiar with TomCat and Java, and
surely I'm missing some configuration to modify.
Thanks to everyone.
Gian Maria
Re: How to share config files in SolrCloud between multiple cores(collections)
Posted by Shawn Heisey <so...@elyograg.org>.
On 3/20/2013 1:28 PM, Li, Qiang wrote:
> I just want to share the solrconfig.xml and schema.xml. As there should be differences between collections for other files, such as the DIH's configurations.
I believe that SolrCloud treats each config set as a completely separate
entity, with no ability to share files. Unless you're dealing with a
very large number of different config combinations, dealing with
multiple config sets should not be too bad. Also, it is possible to
provide any part of the config for DIH as parameters on the URL that
starts the import, so it might be possible to come up with one
dataimport config that will work for multiple collections.
It would probably be possible to share certain files between config sets
by patching Solr's source code, but I doubt that it would be easy to
implement, and a major change like that would require extensive testing
before it would be allowed in a released version.
Thanks,
Shawn
RE: How to share config files in SolrCloud between multiple
cores(collections)
Posted by "Li, Qiang" <Qi...@msci.com>.
I just want to share the solrconfig.xml and schema.xml. As there should be differences between collections for other files, such as the DIH's configurations.
-----Original Message-----
From: Mark Miller [mailto:markrmiller@gmail.com]
Sent: Tuesday, March 19, 2013 11:19 AM
To: solr-user@lucene.apache.org
Subject: Re: How to share config files in SolrCloud between multiple cores(collections)
To share configs in SolrCloud you just upload a single config set and then link it to multiple collections. You don't actually use solr.xml to do it.
- Mark
On Mar 19, 2013, at 10:43 AM, "Li, Qiang" <Qi...@msci.com> wrote:
> We have multiple cores with the same configurations, before using SolrCloud, we can use relative path in solr.xml. But with Solr4, is seems denied for using relative path for the schema and config in solr.xml.
>
> Regards,
> Ivan
>
> This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message. Local registered entity information: http://www.msci.com/legal/local_registered_entities.html
This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message. Local registered entity information: http://www.msci.com/legal/local_registered_entities.html
Re: How to share config files in SolrCloud between multiple cores(collections)
Posted by Mark Miller <ma...@gmail.com>.
To share configs in SolrCloud you just upload a single config set and then link it to multiple collections. You don't actually use solr.xml to do it.
- Mark
On Mar 19, 2013, at 10:43 AM, "Li, Qiang" <Qi...@msci.com> wrote:
> We have multiple cores with the same configurations, before using SolrCloud, we can use relative path in solr.xml. But with Solr4, is seems denied for using relative path for the schema and config in solr.xml.
>
> Regards,
> Ivan
>
> This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message. Local registered entity information: http://www.msci.com/legal/local_registered_entities.html
How to share config files in SolrCloud between multiple
cores(collections)
Posted by "Li, Qiang" <Qi...@msci.com>.
We have multiple cores with the same configurations, before using SolrCloud, we can use relative path in solr.xml. But with Solr4, is seems denied for using relative path for the schema and config in solr.xml.
Regards,
Ivan
This email message and any attachments are for the sole use of the intended recipients and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachments to the original message. Local registered entity information: http://www.msci.com/legal/local_registered_entities.html
RE: how to deploy customization in solr that requires dependency
Posted by Gian Maria Ricci <al...@nablasoft.com>.
Thanks to everyone, now I have a clearer understanding of where to put my
jar dependencies.
Gian Maria.
-----Original Message-----
From: Shawn Heisey [mailto:solr@elyograg.org]
Sent: Monday, March 18, 2013 11:57 PM
To: solr-user@lucene.apache.org
Subject: Re: how to deploy customization in solr that requires dependency
On 3/18/2013 11:47 AM, Gian Maria Ricci wrote:
> I want to deploy a custom filter developed in java to Solr4, my
> problem is that it requires to access Sql Server, so it depends from
> sqljdbc4.jar, but I got a java.lang.ClassNotFoundException:
> com.microsoft.sqlserver.jdbc.SQLServerDriver
Solr has a property "solr.solr.home" (which defaults to solr in the current
working directory) ... this is the directory where solr.xml lives. By
default, Solr is supposed to look for a lib directory in this location, from
which jar files can be loaded by all cores. I make this explicit in my
config with a 'sharedLib="lib"' attribute on the solr tag in solr.xml, but
it's my understanding that this config is not strictly required.
I put all jar files required by Solr here. My solr.solr.home is set to
/index/solr4:
ncindex@bigindy5 ~ $ ls /index/solr4/lib icu4j-49.1.jar
lucene-analyzers-icu-4.3-SNAPSHOT.jar
mysql-connector-java-5.1.22-bin.jar
solr-dataimporthandler-4.3-SNAPSHOT.jar
solr-dataimporthandler-extras-4.3-SNAPSHOT.jar
Thanks,
Shawn
Re: how to deploy customization in solr that requires dependency
Posted by Shawn Heisey <so...@elyograg.org>.
On 3/18/2013 11:47 AM, Gian Maria Ricci wrote:
> I want to deploy a custom filter developed in java to Solr4, my problem is
> that it requires to access Sql Server, so it depends from sqljdbc4.jar, but
> I got a java.lang.ClassNotFoundException:
> com.microsoft.sqlserver.jdbc.SQLServerDriver
Solr has a property "solr.solr.home" (which defaults to solr in the
current working directory) ... this is the directory where solr.xml
lives. By default, Solr is supposed to look for a lib directory in this
location, from which jar files can be loaded by all cores. I make this
explicit in my config with a 'sharedLib="lib"' attribute on the solr tag
in solr.xml, but it's my understanding that this config is not strictly
required.
I put all jar files required by Solr here. My solr.solr.home is set to
/index/solr4:
ncindex@bigindy5 ~ $ ls /index/solr4/lib
icu4j-49.1.jar
lucene-analyzers-icu-4.3-SNAPSHOT.jar
mysql-connector-java-5.1.22-bin.jar
solr-dataimporthandler-4.3-SNAPSHOT.jar
solr-dataimporthandler-extras-4.3-SNAPSHOT.jar
Thanks,
Shawn
Re: how to deploy customization in solr that requires dependency
Posted by Dmitry Kan <so...@gmail.com>.
Hi,
See here, might help:
http://wiki.apache.org/solr/SolrPlugins#How_to_Load_Plugins
We don't use multicore functionality of SOLR, so we decided to bundle SOLR
dependencies into the war file of the solr web app.
Regards,
Dmitry
On Mon, Mar 18, 2013 at 7:47 PM, Gian Maria Ricci
<al...@nablasoft.com>wrote:
> Hi to everyone,
>
>
>
> I want to deploy a custom filter developed in java to Solr4, my problem is
> that it requires to access Sql Server, so it depends from sqljdbc4.jar, but
> I got a java.lang.ClassNotFoundException:
> com.microsoft.sqlserver.jdbc.SQLServerDriver
>
>
>
> I've copied the sqljdbc.jar file in the c:\tomcat\lib directory but it does
> not work. So I've modified solrconfig.xml to load sqljdbc4.jar and now it
> works, but I think that is a bettere solution to configure in some base
> Tomcat directory instead in solrcfg.xml file of all cores. My question is,
> where I can configure Tomcat to make sqljdbc4.jar available to every
> customization filter in solar without referencing it directly in
> solrcfg.xml?
>
>
>
> I'm a .NET developer, so I'm not really familiar with TomCat and Java, and
> surely I'm missing some configuration to modify.
>
>
>
> Thanks to everyone.
>
>
>
> Gian Maria
>
>
>
>