Hi Rodrigo,

as I understand it, you know where the index is located.

If you can also find out where the configuration files are - if they are simply 
accessible on the FS - you could start a regular SOLR server that simply uses 
that config directory as SOLR_HOME (it will automatically use the correct data 
dir, or you can make sure it does by providing that data directory when you 
start the server).

To find the config files you would be looking for these files, ideally in the 
following directory structure:

single index:
  -conf/schema.xml
  -conf/solrconfig.xml

multiple indexes (cores):
  -solr.xml
  -<core1>/
     -conf/schema.xml
     -conf/solrconfig.xml
  -more core dirs …

There is no dedicated Wiki page describing the structure but this one might 
help:
http://wiki.apache.org/solr/CoreAdmin

Also the examples in the sources reflect mostly the conventional structure 
except that the directory "collection1" would be omitted:
https://builds.apache.org/job/Solr-trunk/ws/checkout/solr/example/solr/collection1/conf/
SOLR_HOME in this case is solr/ which contains conf/

If they would be structured in that way you could simply start a regular 
solr.war as described in the SOLR documentation (e.g. via Jetty: 
http://wiki.apache.org/solr/SolrJetty), pointing it to that directory as 
SOLR_HOME. You would then have a running SOLR Server that you could update the 
way you suggested in your previous response.

When in doubt about the configuration, include the content of the <dataDir> 
element in solrconfig.xml in the next posting. Also, describe the structure of 
the config directory and which files it includes. It might help. Or describe 
how the application initializes the embedded server.

If the files are not located in the FS but somewhere inside the application 
where you cannot easily reference them when starting Jetty or if it is 
configured programmatically, you would have to create your own configuration 
directory by copying/creating them in the expected structure. The <dataDir> 
entry in solrconfig.xml has to point to the same data directory as the embedded 
solr server uses.

Hu, I hope I was clear enough. Please ask if not.

Cheers,
Chantal

Am 31.07.2012 um 11:23 schrieb Rodrigo P. Bregalanti:

> Hi Chantal, thanks for replying.
> It is very helpfull, and I think I am in the right path.
> 
> As the database is not changed during the night, my idea is to add a cron
> job to re-index that at this time. The main problem is there is no separate
> service indexing the data. The applicaton is using Java+Grails and a Grails
> plugin for Solr, which integrates to the grails domain classes. When a
> domain class is saved through the application, this plugins add/remove that
> from the index automatically.
> 
> After some research I noticed that if there was a separate Solr server, I
> could post a call using HTTP to the Solr server, but the application is
> using an embedded server.
> 
> I have found in the file system where the solr data and indexes are being
> saved, but I don not know if Solrj has some utility class that could be
> called from command line using those files, in a cron job schedule. Do you
> know if it is possible?
> 
> Best regards.
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Rebuild-index-after-database-change-tp3998257p3998311.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to