Re: MoreLikeThis (mlt) in sharded SolrCloud

2015-04-19 Thread Ere Maijala
Thanks, Anshum. Looks like there's no way for this to work in 5.1 for us 
so I'll just have to wait to for the fixes. Relieving to know it wasn't 
just me, though.


--Ere

18.4.2015, 2.45, Anshum Gupta kirjoitti:

The other issue that would fix half of your problems is:
https://issues.apache.org/jira/browse/SOLR-7143

On Fri, Apr 17, 2015 at 4:35 PM, Anshum Gupta ans...@anshumgupta.net
wrote:


Ah, I meant SOLR-7418 https://issues.apache.org/jira/browse/SOLR-7418.

On Fri, Apr 17, 2015 at 4:30 PM, Anshum Gupta ans...@anshumgupta.net
wrote:


Hi Ere,

Those seem like valid issues. I've created an issue : SOLR-7275
https://issues.apache.org/jira/browse/SOLR-7275 and will create more
as I find more of those.
I plan to get to them and fix over the weekend.

On Wed, Apr 15, 2015 at 5:13 AM, Ere Maijala ere.maij...@helsinki.fi
wrote:


Hi,

I'm trying to gather information on how mlt works or is supposed to work
with SolrCloud and a sharded collection. I've read issues SOLR-6248,
SOLR-5480 and SOLR-4414, and docs at 
https://wiki.apache.org/solr/MoreLikeThis, but I'm still struggling
with multiple issues. I've been testing with Solr 5.1 and the Getting
Started sample cloud. So, with a freshly extracted Solr, these are the
steps I've done:

bin/solr start -e cloud -noprompt
bin/post -c gettingstarted docs/
bin/post -c gettingstarted example/exampledocs/books.json

After this I've tried different variations of queries with limited
success:

http://localhost:8983/solr/gettingstarted/select?q={!mlt}non-existing
causes java.lang.NullPointerException at
org.apache.solr.search.mlt.CloudMLTQParser.parse(CloudMLTQParser.java:80)

http://localhost:8983/solr/gettingstarted/select?q={!mlt}978-0641723445



causes java.lang.NullPointerException at
org.apache.solr.search.mlt.CloudMLTQParser.parse(CloudMLTQParser.java:84)


http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=title}978-0641723445
http://localhost:8983/solr/gettingstarted/select?q=%7B!mlt%20qf=title%7D978-0641723445



causes java.lang.NullPointerException at
org.apache.lucene.queries.mlt.MoreLikeThis.retrieveTerms(MoreLikeThis.java:759)


http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=cat}978-0641723445
http://localhost:8983/solr/gettingstarted/select?q=%7B!mlt%20qf=cat%7D978-0641723445



actually gives results


http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=author,cat}978-0641723445
http://localhost:8983/solr/gettingstarted/select?q=%7B!mlt%20qf=author,cat%7D978-0641723445



again causes Java.lang.NullPointerException at
org.apache.lucene.queries.mlt.MoreLikeThis.retrieveTerms(MoreLikeThis.java:759)


I guess the actual question is, how am I supposed to use the handler to
replicate behavior of non-distributed mlt that was formerly used with
qt=morelikethis and the following configuration in solrconfig.xml:

   requestHandler name=morelikethis class=solr.MoreLikeThisHandler
 lst name=defaults
   str
name=mlt.fltitle,title_short,callnumber-label,topic,language,author,publishDate/str
   str name=mlt.qf
 title^75
 title_short^100
 callnumber-label^400
 topic^300
 language^30
 author^75
 publishDate
   /str
   int name=mlt.mintf1/int
   int name=mlt.mindf1/int
   str name=mlt.boosttrue/str
   int name=mlt.count5/int
   int name=rows5/int
 /lst
   /requestHandler

Real-life full schema and config can be found at 
https://github.com/NatLibFi/NDL-VuFind-Solr/tree/master/vufind/biblio/conf

.


--Ere

--
Ere Maijala
Kansalliskirjasto / The National Library of Finland





--
Anshum Gupta





--
Anshum Gupta








--
Ere Maijala
Kansalliskirjasto / The National Library of Finland


Re: MoreLikeThis (mlt) in sharded SolrCloud

2015-04-17 Thread Anshum Gupta
Ah, I meant SOLR-7418 https://issues.apache.org/jira/browse/SOLR-7418.

On Fri, Apr 17, 2015 at 4:30 PM, Anshum Gupta ans...@anshumgupta.net
wrote:

 Hi Ere,

 Those seem like valid issues. I've created an issue : SOLR-7275
 https://issues.apache.org/jira/browse/SOLR-7275 and will create more as
 I find more of those.
 I plan to get to them and fix over the weekend.

 On Wed, Apr 15, 2015 at 5:13 AM, Ere Maijala ere.maij...@helsinki.fi
 wrote:

 Hi,

 I'm trying to gather information on how mlt works or is supposed to work
 with SolrCloud and a sharded collection. I've read issues SOLR-6248,
 SOLR-5480 and SOLR-4414, and docs at 
 https://wiki.apache.org/solr/MoreLikeThis, but I'm still struggling
 with multiple issues. I've been testing with Solr 5.1 and the Getting
 Started sample cloud. So, with a freshly extracted Solr, these are the
 steps I've done:

 bin/solr start -e cloud -noprompt
 bin/post -c gettingstarted docs/
 bin/post -c gettingstarted example/exampledocs/books.json

 After this I've tried different variations of queries with limited
 success:

 http://localhost:8983/solr/gettingstarted/select?q={!mlt}non-existing
 causes java.lang.NullPointerException at
 org.apache.solr.search.mlt.CloudMLTQParser.parse(CloudMLTQParser.java:80)

 http://localhost:8983/solr/gettingstarted/select?q={!mlt}978-0641723445
 causes java.lang.NullPointerException at
 org.apache.solr.search.mlt.CloudMLTQParser.parse(CloudMLTQParser.java:84)

 
 http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=title}978-0641723445
 http://localhost:8983/solr/gettingstarted/select?q=%7B!mlt%20qf=title%7D978-0641723445
 
 causes java.lang.NullPointerException at
 org.apache.lucene.queries.mlt.MoreLikeThis.retrieveTerms(MoreLikeThis.java:759)

 
 http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=cat}978-0641723445
 http://localhost:8983/solr/gettingstarted/select?q=%7B!mlt%20qf=cat%7D978-0641723445
 
 actually gives results

 
 http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=author,cat}978-0641723445
 http://localhost:8983/solr/gettingstarted/select?q=%7B!mlt%20qf=author,cat%7D978-0641723445
 
 again causes Java.lang.NullPointerException at
 org.apache.lucene.queries.mlt.MoreLikeThis.retrieveTerms(MoreLikeThis.java:759)


 I guess the actual question is, how am I supposed to use the handler to
 replicate behavior of non-distributed mlt that was formerly used with
 qt=morelikethis and the following configuration in solrconfig.xml:

   requestHandler name=morelikethis class=solr.MoreLikeThisHandler
 lst name=defaults
   str
 name=mlt.fltitle,title_short,callnumber-label,topic,language,author,publishDate/str
   str name=mlt.qf
 title^75
 title_short^100
 callnumber-label^400
 topic^300
 language^30
 author^75
 publishDate
   /str
   int name=mlt.mintf1/int
   int name=mlt.mindf1/int
   str name=mlt.boosttrue/str
   int name=mlt.count5/int
   int name=rows5/int
 /lst
   /requestHandler

 Real-life full schema and config can be found at 
 https://github.com/NatLibFi/NDL-VuFind-Solr/tree/master/vufind/biblio/conf
 .

 --Ere

 --
 Ere Maijala
 Kansalliskirjasto / The National Library of Finland




 --
 Anshum Gupta




-- 
Anshum Gupta


Re: MoreLikeThis (mlt) in sharded SolrCloud

2015-04-17 Thread Anshum Gupta
The other issue that would fix half of your problems is:
https://issues.apache.org/jira/browse/SOLR-7143

On Fri, Apr 17, 2015 at 4:35 PM, Anshum Gupta ans...@anshumgupta.net
wrote:

 Ah, I meant SOLR-7418 https://issues.apache.org/jira/browse/SOLR-7418.

 On Fri, Apr 17, 2015 at 4:30 PM, Anshum Gupta ans...@anshumgupta.net
 wrote:

 Hi Ere,

 Those seem like valid issues. I've created an issue : SOLR-7275
 https://issues.apache.org/jira/browse/SOLR-7275 and will create more
 as I find more of those.
 I plan to get to them and fix over the weekend.

 On Wed, Apr 15, 2015 at 5:13 AM, Ere Maijala ere.maij...@helsinki.fi
 wrote:

 Hi,

 I'm trying to gather information on how mlt works or is supposed to work
 with SolrCloud and a sharded collection. I've read issues SOLR-6248,
 SOLR-5480 and SOLR-4414, and docs at 
 https://wiki.apache.org/solr/MoreLikeThis, but I'm still struggling
 with multiple issues. I've been testing with Solr 5.1 and the Getting
 Started sample cloud. So, with a freshly extracted Solr, these are the
 steps I've done:

 bin/solr start -e cloud -noprompt
 bin/post -c gettingstarted docs/
 bin/post -c gettingstarted example/exampledocs/books.json

 After this I've tried different variations of queries with limited
 success:

 http://localhost:8983/solr/gettingstarted/select?q={!mlt}non-existing
 causes java.lang.NullPointerException at
 org.apache.solr.search.mlt.CloudMLTQParser.parse(CloudMLTQParser.java:80)

 http://localhost:8983/solr/gettingstarted/select?q={!mlt}978-0641723445
 
 causes java.lang.NullPointerException at
 org.apache.solr.search.mlt.CloudMLTQParser.parse(CloudMLTQParser.java:84)

 
 http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=title}978-0641723445
 http://localhost:8983/solr/gettingstarted/select?q=%7B!mlt%20qf=title%7D978-0641723445
 
 causes java.lang.NullPointerException at
 org.apache.lucene.queries.mlt.MoreLikeThis.retrieveTerms(MoreLikeThis.java:759)

 
 http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=cat}978-0641723445
 http://localhost:8983/solr/gettingstarted/select?q=%7B!mlt%20qf=cat%7D978-0641723445
 
 actually gives results

 
 http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=author,cat}978-0641723445
 http://localhost:8983/solr/gettingstarted/select?q=%7B!mlt%20qf=author,cat%7D978-0641723445
 
 again causes Java.lang.NullPointerException at
 org.apache.lucene.queries.mlt.MoreLikeThis.retrieveTerms(MoreLikeThis.java:759)


 I guess the actual question is, how am I supposed to use the handler to
 replicate behavior of non-distributed mlt that was formerly used with
 qt=morelikethis and the following configuration in solrconfig.xml:

   requestHandler name=morelikethis class=solr.MoreLikeThisHandler
 lst name=defaults
   str
 name=mlt.fltitle,title_short,callnumber-label,topic,language,author,publishDate/str
   str name=mlt.qf
 title^75
 title_short^100
 callnumber-label^400
 topic^300
 language^30
 author^75
 publishDate
   /str
   int name=mlt.mintf1/int
   int name=mlt.mindf1/int
   str name=mlt.boosttrue/str
   int name=mlt.count5/int
   int name=rows5/int
 /lst
   /requestHandler

 Real-life full schema and config can be found at 
 https://github.com/NatLibFi/NDL-VuFind-Solr/tree/master/vufind/biblio/conf
 .

 --Ere

 --
 Ere Maijala
 Kansalliskirjasto / The National Library of Finland




 --
 Anshum Gupta




 --
 Anshum Gupta




-- 
Anshum Gupta


MoreLikeThis (mlt) in sharded SolrCloud

2015-04-15 Thread Ere Maijala

Hi,

I'm trying to gather information on how mlt works or is supposed to work 
with SolrCloud and a sharded collection. I've read issues SOLR-6248, 
SOLR-5480 and SOLR-4414, and docs at 
https://wiki.apache.org/solr/MoreLikeThis, but I'm still struggling 
with multiple issues. I've been testing with Solr 5.1 and the Getting 
Started sample cloud. So, with a freshly extracted Solr, these are the 
steps I've done:


bin/solr start -e cloud -noprompt
bin/post -c gettingstarted docs/
bin/post -c gettingstarted example/exampledocs/books.json

After this I've tried different variations of queries with limited success:

http://localhost:8983/solr/gettingstarted/select?q={!mlt}non-existing
causes java.lang.NullPointerException at 
org.apache.solr.search.mlt.CloudMLTQParser.parse(CloudMLTQParser.java:80)


http://localhost:8983/solr/gettingstarted/select?q={!mlt}978-0641723445
causes java.lang.NullPointerException at 
org.apache.solr.search.mlt.CloudMLTQParser.parse(CloudMLTQParser.java:84)


http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=title}978-0641723445
causes java.lang.NullPointerException at 
org.apache.lucene.queries.mlt.MoreLikeThis.retrieveTerms(MoreLikeThis.java:759)


http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=cat}978-0641723445
actually gives results

http://localhost:8983/solr/gettingstarted/select?q={!mlt%20qf=author,cat}978-0641723445
again causes Java.lang.NullPointerException at 
org.apache.lucene.queries.mlt.MoreLikeThis.retrieveTerms(MoreLikeThis.java:759)



I guess the actual question is, how am I supposed to use the handler to 
replicate behavior of non-distributed mlt that was formerly used with 
qt=morelikethis and the following configuration in solrconfig.xml:


  requestHandler name=morelikethis class=solr.MoreLikeThisHandler
lst name=defaults
  str 
name=mlt.fltitle,title_short,callnumber-label,topic,language,author,publishDate/str

  str name=mlt.qf
title^75
title_short^100
callnumber-label^400
topic^300
language^30
author^75
publishDate
  /str
  int name=mlt.mintf1/int
  int name=mlt.mindf1/int
  str name=mlt.boosttrue/str
  int name=mlt.count5/int
  int name=rows5/int
/lst
  /requestHandler

Real-life full schema and config can be found at 
https://github.com/NatLibFi/NDL-VuFind-Solr/tree/master/vufind/biblio/conf.


--Ere

--
Ere Maijala
Kansalliskirjasto / The National Library of Finland