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 darniz <rn...@edmunds.com> on 2009/11/21 01:42:04 UTC
Embedded solr with third party libraries
Hi
We are having issue running our test cases with third party library for
embedded solr.
For exampel we are using kstem library which is not a part of solr
distirbution. When we run test cases our schema.xml has defintion for lucid
kstem and it throws ClassNotFound Exception.
We declared the depency for the two jars lucid-kstem.jar and
lucid-solr-kstem.jar but still it throws an error.
Till now whenever we have to run embedded solr we manually copy all the
config files like schema.xml, solrConfig.xml to a temp directory which is
considered solr home and its generally under the user home directory which
will copy all config files to user_home/solr/conf/directory. below is the
example
C:\DOCUME~1\username\LOCALS~1\Temp\solr-all\0.8194571792905493\solr\conf\schema.xml
Now in order for the jar to be loaded should i copy the two jars to solr/lib
directory. is that the default location embedded solr looks into for some
default jars.
Any advice.
--
View this message in context: http://old.nabble.com/Embedded-solr-with-third-party-libraries-tp26452534p26452534.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Embedded solr with third party libraries
Posted by Lance Norskog <go...@gmail.com>.
To deploy the Lucid KStem stemmer, copy these two files:
lucid-kstem.jar
lucid-solr-kstem.jar
to the lib/ directory in your running solr instance.
In the <fieldType> declaration for a text field, you would change this line:
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt" />
to this:
<filter
class="com.lucidimagination.solrworks.analysis.LucidKStemFilterFactory"
protected="protwords.txt"/>
(Remember that you have to make this change in both the query and
analysis sections of the fieldType specification.)
Now, to verify the change, restart solr and go to the analysis.jsp test page:
http://localhost:8983/solr/admin/analysis.jsp
Let's say you changed the 'text' type and left 'textTight' using
PorterStemmer. Change the Field name/type drop-down to 'type' and type
'text' in the top box. Now type 'changing' in the "Field Value" box
and click 'Analyze'. The bottom of the page will now show that
'changeing' was stemmed to 'change'. If you change the field type from
'text' to 'textTight' and try again, 'changing' will be stemmed to
'chang' by the original PorterStemmer.
On Mon, Nov 23, 2009 at 12:23 PM, Chris Hostetter
<ho...@fucit.org> wrote:
>
> : distirbution. When we run test cases our schema.xml has defintion for lucid
> : kstem and it throws ClassNotFound Exception.
> : We declared the depency for the two jars lucid-kstem.jar and
> : lucid-solr-kstem.jar but still it throws an error.
>
> explain what you mean by "declared the depency" ?
>
> : C:\DOCUME~1\username\LOCALS~1\Temp\solr-all\0.8194571792905493\solr\conf\schema.xml
> :
> : Now in order for the jar to be loaded should i copy the two jars to solr/lib
> : directory. is that the default location embedded solr looks into for some
> : default jars.
>
> assuming "C:\DOCUME~1\username\LOCALS~1\Temp\solr-all\0.8194571792905493\solr"
> is your sole home dir, then yes you can copy your jars into
> "C:\DOCUME~1\username\LOCALS~1\Temp\solr-all\0.8194571792905493\solr\lib"
> and that should work ... or starting in Solr 1.4 you can use the <lib>
> directorives to specify a jar anywhere on disk. see the example
> solrconfig.xml for the syntax.
>
>
>
> -Hoss
>
>
--
Lance Norskog
goksron@gmail.com
Re: Embedded solr with third party libraries
Posted by Chris Hostetter <ho...@fucit.org>.
: distirbution. When we run test cases our schema.xml has defintion for lucid
: kstem and it throws ClassNotFound Exception.
: We declared the depency for the two jars lucid-kstem.jar and
: lucid-solr-kstem.jar but still it throws an error.
explain what you mean by "declared the depency" ?
: C:\DOCUME~1\username\LOCALS~1\Temp\solr-all\0.8194571792905493\solr\conf\schema.xml
:
: Now in order for the jar to be loaded should i copy the two jars to solr/lib
: directory. is that the default location embedded solr looks into for some
: default jars.
assuming "C:\DOCUME~1\username\LOCALS~1\Temp\solr-all\0.8194571792905493\solr"
is your sole home dir, then yes you can copy your jars into
"C:\DOCUME~1\username\LOCALS~1\Temp\solr-all\0.8194571792905493\solr\lib"
and that should work ... or starting in Solr 1.4 you can use the <lib>
directorives to specify a jar anywhere on disk. see the example
solrconfig.xml for the syntax.
-Hoss