You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by outre <sp...@hotmail.com> on 2008/09/16 20:29:39 UTC
Distributed custom component
Hi,
I am fairly new to solr, but I realize that the question I am about to ask
is fairly large.
Is there any way to create a custom component that would compile and run
with the latest solr src and would be capable of doing distributed search?
I have looked at localsolr example and QueryComponent, created a similar
setup except for I was trying to compile with the latest code from svn. It
compiles fine but at run time I get access violation for
org/apache/solr/handler/component/ShardFieldSortedHitQueue.
--
View this message in context: http://www.nabble.com/Distributed-custom-component-tp19517853p19517853.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: Distributed custom component
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Thu, Sep 18, 2008 at 7:57 PM, outre <sp...@hotmail.com> wrote:
>
> So is any code from solr-303 going to merged with latest solr trunk?
I'm not sure about your problem but SOLR-303 is already committed and has
been released with Solr 1.3
> I saw a post about localsolr being donated to solr. So, my guess the two
> eventually are going to be compatible. But were any plans/decisions made
> for
> about now?
>
Yes it has been donated to Lucene/Solr. You'll see progress in the coming
weeks. See the following issues opened for this:
https://issues.apache.org/jira/browse/LUCENE-1387
https://issues.apache.org/jira/browse/SOLR-773
--
Regards,
Shalin Shekhar Mangar.
Re: Distributed custom component
Posted by outre <sp...@hotmail.com>.
May be if I expand on it a bit ?
Basically, I want localsolr to work with the latest trunk of the solr. And
it seems to work just fine, but the distributed version doesn't work. Even
though looking at the comments it seems the modes from solr-303 were planned
to be moved to the latest code base(at least according to the localsolr
author)
I have modified access on those classes and member variables that were
required to compile localsolr with the latest solr trunk. Now when I run
the component it doesn't seem to call component's "process" function when I
specify shards variable in the request query.
So is any code from solr-303 going to merged with latest solr trunk?
I saw a post about localsolr being donated to solr. So, my guess the two
eventually are going to be compatible. But were any plans/decisions made for
about now?
Does anyone know why component's "process" is not being called when in
distributed mode?
Thanks
outre wrote:
>
> Hi,
>
> I am fairly new to solr, but I realize that the question I am about to ask
> is fairly large.
>
> Is there any way to create a custom component that would compile and run
> with the latest solr src and would be capable of doing distributed search?
>
> I have looked at localsolr example and QueryComponent, created a similar
> setup except for I was trying to compile with the latest code from svn. It
> compiles fine but at run time I get access violation for
> org/apache/solr/handler/component/ShardFieldSortedHitQueue.
>
>
>
--
View this message in context: http://www.nabble.com/Distributed-custom-component-tp19517853p19554163.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: Distributed custom component
Posted by outre <sp...@hotmail.com>.
Here is what I got so far.
I can add shard.qt parameter to the query string along with shards and qt,
then distributed version of my component is working.
Otherwise "process" function in my custom component is not called, only
default SolrCore "execute".
It seems like a hacky approach to the problem though, I am wondering if
there is better solution.
Thanks
outre wrote:
>
> Seems like my problem could be that qt parameter is not passed.
>
> I see it in the createMainQuery and then after it in SolrCore execute
> params do not have qt in there.
>
> It appears that in SearchHandle:
>
> String shardHandler = req.getParams().get(ShardParams.SHARDS_QT);
> if (shardHandler == null) {
> params.remove(CommonParams.QT);
> } else {
> params.set(CommonParams.QT, shardHandler);
> }
>
> Where ShardParams.SHARDS_QT = "shards.qt".
>
> Should I change qt shards.qt then? Or is there another way?
>
>
> Thanks
>
>
> outre wrote:
>>
>> Hi,
>>
>> I am fairly new to solr, but I realize that the question I am about to
>> ask is fairly large.
>>
>> Is there any way to create a custom component that would compile and run
>> with the latest solr src and would be capable of doing distributed
>> search?
>>
>> I have looked at localsolr example and QueryComponent, created a similar
>> setup except for I was trying to compile with the latest code from svn.
>> It compiles fine but at run time I get access violation for
>> org/apache/solr/handler/component/ShardFieldSortedHitQueue.
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Distributed-custom-component-tp19517853p19562451.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: Distributed custom component
Posted by outre <sp...@hotmail.com>.
Seems like my problem could be that qt parameter is not passed.
I see it in the createMainQuery and then after it in SolrCore execute params
do not have qt in there.
It appears that in SearchHandle:
String shardHandler = req.getParams().get(ShardParams.SHARDS_QT);
if (shardHandler == null) {
params.remove(CommonParams.QT);
} else {
params.set(CommonParams.QT, shardHandler);
}
Where ShardParams.SHARDS_QT = "shards.qt".
Should I change qt shards.qt then? Or is there another way?
Thanks
outre wrote:
>
> Hi,
>
> I am fairly new to solr, but I realize that the question I am about to ask
> is fairly large.
>
> Is there any way to create a custom component that would compile and run
> with the latest solr src and would be capable of doing distributed search?
>
> I have looked at localsolr example and QueryComponent, created a similar
> setup except for I was trying to compile with the latest code from svn. It
> compiles fine but at run time I get access violation for
> org/apache/solr/handler/component/ShardFieldSortedHitQueue.
>
>
>
--
View this message in context: http://www.nabble.com/Distributed-custom-component-tp19517853p19559544.html
Sent from the Solr - Dev mailing list archive at Nabble.com.