Getting running with SOLR

71 views
Skip to first unread message

Ken Kirby

unread,
Feb 14, 2014, 12:09:17 PM2/14/14
to semanti...@googlegroups.com
Hi Folks,

I guess I'm struggling a bit with the basics of getting running with SOLR. I've started a new instance of SOLR based on 4.6.0 (which I understand to work with SV 5.4). I've also indexed the handful of example docs that come with the SOLR example setup.


I've setup my classpath var as such
C:\sment\clas_srv\sv>echo %CLASSPATH%
.;C:\sment\clas_srv\sv\semanticvectors-5.4.jar;C:\sment\clas_srv\solr\example\solr-webapp\webapp\WEB-INF\lib\lucene-core-4.6.0.jar


However, when I try to execute BuildIndex, I'm getting the following

C:\sment\clas_srv\sv>java -cp semanticvectors-5.4.jar;lucene-core-4.6.0.jar pitt.search.semanticvectors.BuildIndex -contentsfields title,text -docidfield id -luceneindexpath C:\sment\clas_srv\solr\example\solr\collection1\data\index
Seedlength: 10, Dimension: 200, Vector type: REAL, Minimum frequency: 0, Maximum frequency: 2147483647, Number non-alphabet characters: 2147483647, Contents fie
lds are: [title, text]
Creating term vectors as superpositions of elemental document vectors ...
Creating semantic term vectors ...Exception in thread "main" java.lang.NullPointerException
        at pitt.search.semanticvectors.TermVectorsFromLucene.trainTermVectors(TermVectorsFromLucene.java:134)
        at pitt.search.semanticvectors.TermVectorsFromLucene.createTermVectorsFromLuceneImpl(TermVectorsFromLucene.java:123)
        at pitt.search.semanticvectors.TermVectorsFromLucene.createTermVectorsFromLucene(TermVectorsFromLucene.java:97)
        at pitt.search.semanticvectors.BuildIndex.main(BuildIndex.java:109)


Any ideas would be greatly appreciated!


Thanks,

Ken K

PS - Dominic, I am VERY eagerly awaiting the copy of "Geometry and Meaning" that I just got on Amazon - your sample chapter was awesome!

Dominic Widdows

unread,
Feb 14, 2014, 4:43:25 PM2/14/14
to semanti...@googlegroups.com
Hi Ken,

Unfortunately I haven't encountered this issue myself, and won't be able to try to repro until the week after next (big anniversary and then family holiday). I've documented the current problems at https://code.google.com/p/semanticvectors/wiki/SolrAndSemanticVectors.

Please please, if anyone *has* gotten SV 5.x to work with Apache SOLR, chime in to this thread to say it's possible and mention any extra steps you had to take.

Best wishes,
Dominic

PS. Thank you so much for your kind words of encouragement, Ken, and I hope you enjoy Geometry and Meaning when it arrives :) 


--
You received this message because you are subscribed to the Google Groups "Semantic Vectors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticvecto...@googlegroups.com.
To post to this group, send email to semanti...@googlegroups.com.
Visit this group at http://groups.google.com/group/semanticvectors.
For more options, visit https://groups.google.com/groups/opt_out.

Svetoslav Marinov

unread,
Feb 17, 2014, 6:38:14 AM2/17/14
to semanti...@googlegroups.com
Hi Ken,

It works for me with Solr 4.6.1 and SV 5.4 BUT with one modification - change the name of your text field to "contents" and then omit "title". This should build your term and document  vectors. You will get another mistake if you add the title ... so maybe this is something to investigate ... 

Hope this will help you get going with your experiments. You can always copy the title to your contents field in Solr.

Best, 

Svetoslav

Ken Kirby

unread,
Feb 17, 2014, 8:02:49 AM2/17/14
to semanti...@googlegroups.com
Thanks so much Svetoslav - that does the trick. Now I'm up and running!

Ken K
Reply all
Reply to author
Forward
0 new messages