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 karan singh <kv...@hotmail.com> on 2011/05/13 10:42:27 UTC

Field collapsing classloading issues

I applied the SOLR field collapsing patch to solr 3.1.0.                                                                                                        I'm not really sure about what to add in solrconfig.xml. Right now I've added the following :                                        <searchComponent name="queryComponent" class="solr.CollapseComponent" />                                                           <requestHandler name="hand" class="solr.SearchHandler" startup="lazy">                      	<lst name="defaults">                                          		<bool name="ha">true</bool>                  	</lst>                                           	<arr name="components">                 		<str>queryComponent</str>                   	</arr>                      </requestHandler>                                          On running this, I get the following error :                                  SEVERE: org.apache.solr.common.SolrException: Error loading class 'solr.CollapseComponent'                                    Any ideas?                 		 	   		  

Re: Field collapsing classloading issues

Posted by karanveer singh <ka...@gmail.com>.
I finally got it to work. The problem was that I wasn't building
example, and was using a copied version of the webapp.
This earlier webapp did not have the classpaths set for fieldcollapse.
I built example and its working now.

Thanks to everyone who helped!

On Sun, May 15, 2011 at 9:26 PM, Erick Erickson <er...@gmail.com> wrote:
> You can just configure  another <lib....> directive in solrconfig.xml
> if you want.
>
> Or, copy the relevant jars to one of the directories already specified
> by a <lib>
> directive in the config...
>
> Best
> Erick
>
> On Sun, May 15, 2011 at 10:18 AM, karanveer singh
> <ka...@gmail.com> wrote:
>> Since I'm using solr 3.1.0, I'm guessing that the solr.fieldCollapse
>> classpath hasn't been set.
>> How exactly should I be setting this?
>>
>> On Sun, May 15, 2011 at 7:08 PM, karanveer singh
>> <ka...@gmail.com> wrote:
>>> Can you tell me how the packet paths are set? So that I can modify
>>> them and let it know where to find fieldCollapse.class?
>>> My fieldCollapse.class is in build/solr/org/apache/solr/handler/component
>>>
>>> My /lib folder contains some .jar files and some other files, I guess
>>> these were created at the time of compiling. I haven't manually added
>>> any .jar files to this folder.
>>>
>>> On Sun, May 15, 2011 at 3:14 PM, Luis Cappa Banda <lu...@gmail.com> wrote:
>>>> Hello.
>>>>
>>>> Where did you put the .class files associated to FieldCollapsing? It´s usual
>>>> to include them into a .jar contained in /lib server folder, for example.
>>>> Another option is that the packet path "solr.CollapseComponent" it´s not the
>>>> same as the applied in your patch, if it was modified.
>>>>
>>>
>>
>

Re: Field collapsing classloading issues

Posted by Erick Erickson <er...@gmail.com>.
You can just configure  another <lib....> directive in solrconfig.xml
if you want.

Or, copy the relevant jars to one of the directories already specified
by a <lib>
directive in the config...

Best
Erick

On Sun, May 15, 2011 at 10:18 AM, karanveer singh
<ka...@gmail.com> wrote:
> Since I'm using solr 3.1.0, I'm guessing that the solr.fieldCollapse
> classpath hasn't been set.
> How exactly should I be setting this?
>
> On Sun, May 15, 2011 at 7:08 PM, karanveer singh
> <ka...@gmail.com> wrote:
>> Can you tell me how the packet paths are set? So that I can modify
>> them and let it know where to find fieldCollapse.class?
>> My fieldCollapse.class is in build/solr/org/apache/solr/handler/component
>>
>> My /lib folder contains some .jar files and some other files, I guess
>> these were created at the time of compiling. I haven't manually added
>> any .jar files to this folder.
>>
>> On Sun, May 15, 2011 at 3:14 PM, Luis Cappa Banda <lu...@gmail.com> wrote:
>>> Hello.
>>>
>>> Where did you put the .class files associated to FieldCollapsing? It´s usual
>>> to include them into a .jar contained in /lib server folder, for example.
>>> Another option is that the packet path "solr.CollapseComponent" it´s not the
>>> same as the applied in your patch, if it was modified.
>>>
>>
>

Re: Field collapsing classloading issues

Posted by karanveer singh <ka...@gmail.com>.
Since I'm using solr 3.1.0, I'm guessing that the solr.fieldCollapse
classpath hasn't been set.
How exactly should I be setting this?

On Sun, May 15, 2011 at 7:08 PM, karanveer singh
<ka...@gmail.com> wrote:
> Can you tell me how the packet paths are set? So that I can modify
> them and let it know where to find fieldCollapse.class?
> My fieldCollapse.class is in build/solr/org/apache/solr/handler/component
>
> My /lib folder contains some .jar files and some other files, I guess
> these were created at the time of compiling. I haven't manually added
> any .jar files to this folder.
>
> On Sun, May 15, 2011 at 3:14 PM, Luis Cappa Banda <lu...@gmail.com> wrote:
>> Hello.
>>
>> Where did you put the .class files associated to FieldCollapsing? It´s usual
>> to include them into a .jar contained in /lib server folder, for example.
>> Another option is that the packet path "solr.CollapseComponent" it´s not the
>> same as the applied in your patch, if it was modified.
>>
>

Re: Field collapsing classloading issues

Posted by karanveer singh <ka...@gmail.com>.
Can you tell me how the packet paths are set? So that I can modify
them and let it know where to find fieldCollapse.class?
My fieldCollapse.class is in build/solr/org/apache/solr/handler/component

My /lib folder contains some .jar files and some other files, I guess
these were created at the time of compiling. I haven't manually added
any .jar files to this folder.

On Sun, May 15, 2011 at 3:14 PM, Luis Cappa Banda <lu...@gmail.com> wrote:
> Hello.
>
> Where did you put the .class files associated to FieldCollapsing? It´s usual
> to include them into a .jar contained in /lib server folder, for example.
> Another option is that the packet path "solr.CollapseComponent" it´s not the
> same as the applied in your patch, if it was modified.
>

Re: Field collapsing classloading issues

Posted by Luis Cappa Banda <lu...@gmail.com>.
Hello.

Where did you put the .class files associated to FieldCollapsing? It´s usual
to include them into a .jar contained in /lib server folder, for example.
Another option is that the packet path "solr.CollapseComponent" it´s not the
same as the applied in your patch, if it was modified.