Run Solr with a windows pc

This post is more a memo for my self than a tutorial.

Download Solr ( to c:/km/solr/
Dowload Jetty ( to c:/km/jetty/
Download Curl ( to c:/km/curl

Follow this tutorial to run Solr :

Starting Solr : ~/solr/example$ java -jar start.jar
Index All XML documents from the exampledocs folder : ~/solr/example/exampledocs$ java -jar post.jar *.xml

Assume you have a doc file called doc2.doc in the folder, index it using : C:\km\solr\example\exampledocs> c:\km\curl\curl.exe "http://localhost:8983/solr/update/extract?" -F "myfile=@doc2.doc"

Don’t forget to change the or it will replace the last document.

To verify that it has been properly indexed go to : http://localhost:8983/solr/collection1/browse
And type in something contained inside the document.

You can do the same with pdf.

To add the filename to the indexed file open :
and add :
Then index a file using :
C:\km\solr\example\exampledocs> c:\km\curl\curl.exe "http://localhost:8983/solr/update/extract?\km\solr\example\docexamples\doc2.doc&commit=true" -F "myfile=@doc2.doc"

Even simpler :
Index a file using :
C:\km\solr\example\exampledocs> c:\km\curl\curl.exe "http://localhost:8983/solr/update/extract?\km\solr\example\docexamples\doc2.doc&commit=true" -F "myfile=@doc2.doc". It will appear directly in velocity !

Now my next step is to find out :

  • how to index a full windows folder structure
  • how to link with php

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.