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 dan whelan <da...@adicio.com> on 2011/09/22 18:08:35 UTC
mlt content stream help
I would like to use MLT and the content stream feature in solr like on
this page:
http://wiki.apache.org/solr/MoreLikeThisHandler
How should the request handler / solrconfig be setup?
I enabled streaming and I set a requestHandler up by copying the default
request handler and I changed the name to:
name="/mlt"
but when accessing the url like the example on the wiki I get a NPE
because q is not supplied
I'm sure I am just doing it wrong just not sure what.
Thanks,
dan
Re: mlt content stream help
Posted by Chris Hostetter <ho...@fucit.org>.
Dan:
The disconnect here seems to be that these examples urls on the
MoreLikeThisHandler wiki page assume a "/mlt" request handler exists, but
no handler by that name has ever actually existed in the solr example
configs. (the wiki page doesn't explicitly state that those URLs will
work with the example configs, but it certianly suggests it)
Instead of copying the *default* request handler config (using
SearchHandler) verbatim, you need to create a handler declaration that
uses the MoreLikeThisHandler class, ala...
<requestHandler name="/mlt" class="solr.MoreLikeThisHandler">
</requestHandler>
...you can add more configuration (to specify things like default params
and what not) but that's the minimum config that you need to get the MLT
Handler up and running.
I've updated the wiki page to reflect this -- thanks for helping to catch
the mistake
: > > > > http://wiki.apache.org/solr/MoreLikeThisHandler
: > > > >
: > > > > How should the request handler / solrconfig be setup?
: > > > >
: > > > > I enabled streaming and I set a requestHandler up by copying the
: > > > > default
: > > > > request handler and I changed the name to:
: > > > >
: > > > > name="/mlt"
: > > > >
: > > > > but when accessing the url like the example on the wiki I get a NPE
: > > > > because
: > > > > q is not supplied
-Hoss
Re: mlt content stream help
Posted by dan whelan <da...@adicio.com>.
OK. This is exactly what i did.
With a fresh download of solr 3.2
unpack and go to example directory
start solr: java -jar start.jar
the go to exampledocs and run: ./post.sh *xml
Then go here:
http://localhost:8983/solr/mlt?stream.body=electronics%20memory&mlt.fl=manu,cat&mlt.interestingTerms=list&mlt.mintf=0
Problem accessing /solr/mlt. Reason:
NOT_FOUND
The page gives no instructions on setting up mlt or the url is incorrect.
On 9/26/11 8:25 AM, Erick Erickson wrote:
> Please don't say "it's just like the example". If it was,
> then it would most likely be working.
>
> If you don't take the time to show us what you've tried,
> and the results you get back, then there's not much we
> can do to help.
>
> Best
> Erick
>
> On Mon, Sep 26, 2011 at 7:18 AM, dan whelan<da...@adicio.com> wrote:
>> On 9/24/11 12:17 PM, Erick Erickson wrote:
>>> What version of Solr?
>> I am using solr 3.2
>>
>>> When you copied the default, did you set up
>>> default values for MLT?
>> This is what I need help with.
>>
>> "How should the request handler / solrconfig be setup?"
>>
>>
>>> Showing us the request you used
>> The request is exactly the same as the url in the wiki using the example
>> solr / exampledocs
>>
>>> and the relevant portions of your
>>> solrconifg file would help a lot, you might want to review:
>>>
>>> http://wiki.apache.org/solr/UsingMailingLists
>>>
>>> Best
>>> Erick
>>>
>>> On Thu, Sep 22, 2011 at 9:08 AM, dan whelan<da...@adicio.com> wrote:
>>>> I would like to use MLT and the content stream feature in solr like on
>>>> this
>>>> page:
>>>>
>>>> http://wiki.apache.org/solr/MoreLikeThisHandler
>>>>
>>>> How should the request handler / solrconfig be setup?
>>>>
>>>> I enabled streaming and I set a requestHandler up by copying the default
>>>> request handler and I changed the name to:
>>>>
>>>> name="/mlt"
>>>>
>>>> but when accessing the url like the example on the wiki I get a NPE
>>>> because
>>>> q is not supplied
>>>>
>>>> I'm sure I am just doing it wrong just not sure what.
>>>>
>>>> Thanks,
>>>>
>>>> dan
>>>>
>>
Re: mlt content stream help
Posted by Erick Erickson <er...@gmail.com>.
Please don't say "it's just like the example". If it was,
then it would most likely be working.
If you don't take the time to show us what you've tried,
and the results you get back, then there's not much we
can do to help.
Best
Erick
On Mon, Sep 26, 2011 at 7:18 AM, dan whelan <da...@adicio.com> wrote:
> On 9/24/11 12:17 PM, Erick Erickson wrote:
>>
>> What version of Solr?
>
> I am using solr 3.2
>
>> When you copied the default, did you set up
>> default values for MLT?
>
> This is what I need help with.
>
> "How should the request handler / solrconfig be setup?"
>
>
>> Showing us the request you used
>
> The request is exactly the same as the url in the wiki using the example
> solr / exampledocs
>
>> and the relevant portions of your
>> solrconifg file would help a lot, you might want to review:
>>
>> http://wiki.apache.org/solr/UsingMailingLists
>>
>> Best
>> Erick
>>
>> On Thu, Sep 22, 2011 at 9:08 AM, dan whelan<da...@adicio.com> wrote:
>>>
>>> I would like to use MLT and the content stream feature in solr like on
>>> this
>>> page:
>>>
>>> http://wiki.apache.org/solr/MoreLikeThisHandler
>>>
>>> How should the request handler / solrconfig be setup?
>>>
>>> I enabled streaming and I set a requestHandler up by copying the default
>>> request handler and I changed the name to:
>>>
>>> name="/mlt"
>>>
>>> but when accessing the url like the example on the wiki I get a NPE
>>> because
>>> q is not supplied
>>>
>>> I'm sure I am just doing it wrong just not sure what.
>>>
>>> Thanks,
>>>
>>> dan
>>>
>
>
Re: mlt content stream help
Posted by dan whelan <da...@adicio.com>.
On 9/24/11 12:17 PM, Erick Erickson wrote:
> What version of Solr?
I am using solr 3.2
> When you copied the default, did you set up
> default values for MLT?
This is what I need help with.
"How should the request handler / solrconfig be setup?"
> Showing us the request you used
The request is exactly the same as the url in the wiki using the example
solr / exampledocs
> and the relevant portions of your
> solrconifg file would help a lot, you might want to review:
>
> http://wiki.apache.org/solr/UsingMailingLists
>
> Best
> Erick
>
> On Thu, Sep 22, 2011 at 9:08 AM, dan whelan<da...@adicio.com> wrote:
>> I would like to use MLT and the content stream feature in solr like on this
>> page:
>>
>> http://wiki.apache.org/solr/MoreLikeThisHandler
>>
>> How should the request handler / solrconfig be setup?
>>
>> I enabled streaming and I set a requestHandler up by copying the default
>> request handler and I changed the name to:
>>
>> name="/mlt"
>>
>> but when accessing the url like the example on the wiki I get a NPE because
>> q is not supplied
>>
>> I'm sure I am just doing it wrong just not sure what.
>>
>> Thanks,
>>
>> dan
>>
Re: mlt content stream help
Posted by Erick Erickson <er...@gmail.com>.
What version of Solr? When you copied the default, did you set up
default values for MLT?
Showing us the request you used and the relevant portions of your
solrconifg file would help a lot, you might want to review:
http://wiki.apache.org/solr/UsingMailingLists
Best
Erick
On Thu, Sep 22, 2011 at 9:08 AM, dan whelan <da...@adicio.com> wrote:
> I would like to use MLT and the content stream feature in solr like on this
> page:
>
> http://wiki.apache.org/solr/MoreLikeThisHandler
>
> How should the request handler / solrconfig be setup?
>
> I enabled streaming and I set a requestHandler up by copying the default
> request handler and I changed the name to:
>
> name="/mlt"
>
> but when accessing the url like the example on the wiki I get a NPE because
> q is not supplied
>
> I'm sure I am just doing it wrong just not sure what.
>
> Thanks,
>
> dan
>