You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2009/09/25 06:04:16 UTC
Re: Can we point a Solr server to index directory dynamically at
runtime..
: Using a multicore approach, you could send a "create a core named
: 'core3weeksold' pointing to '/datadirs/3weeksold' " command to a live Solr,
: which would spin it up on the fly. Then you query it, and maybe keep it
: spun up until it's not queried for 60 seconds or something, then send a
: "remove core 'core3weeksold' " command.
: See http://wiki.apache.org/solr/CoreAdmin#CoreAdminHandler .
something that seems implicit in the question is what to do when the
request spans all of the data ... this is where (in theory) distributed
searching could help you out.
index each days worth of data into it's own core, that makes it really
easy to expire the old data (just UNLOAD and delete an entire core once
it's more then 30 days old) if your user is only searching "current" dta
then your app can directly query the core containing the most current data
-- but if they want to query the last week, or last two weeks worth of
data, you do a distributed request for all of the shards needed to search
the appropriate amount of data.
Between the ALIAS and SWAP commands it on the CoreAdmin screen it should
be pretty easy have cores with names like "today","1dayold","2dayold" so
that your app can configure simple shard params for all the perumations
you'll need to query.
-Hoss