: In using Solr I've found the need to have a reload command in addition
: to a commit.  The reason for this is sometimes updates are made but are
: not available via the server.  The commit makes a snapshot which on a
: large index is a potentially expensive operation.  Is there a way to do
: reload today?

I'm a little confused, here's a bunch of thoughts on your email in no
particular order...


Making snapshots should be really really really fast and easy -- it's just
creating hardlinks to files, so it shouldn't take very long ... are you
sure it's really an issue?


Generally speaking all a "commit" operation really is is a an instruction
to:
  1) close/reopen the current writer/reaer used for adds/deletes
  2) open a new reader for searches
  3) close the older reader for searches once all currently processing
     requests finish.

...the concept of "reloading" the index really requires that all three of
those things happen -- so in my mind that's what a commit is.

The Solr app won't create snapshots automatically -- it will only do that
if you have a call to the snapshooter script registered as aprt of a
listener -- it sounds like you have a postCommit event listener which does
this.  You might want to turn that off, or change it to a postOptimize
event listener so that snapshoots are only made when you optimize -- or
you could not have any listeners, and just run snapshooter yourself
whenever you want a snapshot

(Bill/Yonik: sanity check me here: there's no reason snapshooter can't be
run manually right?)

When registering a listener, there is also a "wait" option that controlls
wether the operation will block untill the listener is done ...  i don't
know if there's any particular reason why the example for snapshooter has
wait=true, but i think you can change that to false if you think
snapshooting is taking too long (again: bill/yonik, am i wrong?)

Another thing that might take a while when doing a commit -- seperate from
snapshooting -- is the (auto)warming of the various caches that happens
when opening the new reader for searching.  if you are doing lots of
commits at a rapid rate because you really want the newly added docs to
appear right, you may want to turn off any newSearcher listeners you have,
and change the autowarm count on your caches to be 0.


-Hoss

Reply via email to