lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Load pre-built index to Solr
Date Fri, 11 Mar 2016 02:17:19 GMT
bq: is there a better way to load a pre-built index quickly like

In a word (well, two) "Collection Aliasing". You have two collections
and an alias.
So your search URL stays constant, say 'aliasedcollection'. Then you index to
collectionA and point aliasedcollection to it. That's your live system.

Now you index to collectionB, and when it's done just point
aliasedcollection to collectionB.

You can still address collectionA and collectionB explicitly. So the
indexing process becomes
> point the alias to collectionA
> delete all docs on collectionB
> index to collectionB
> point the alias to collectionB

Repeat  switching A for B next time you index.

See the Collections API CREATEALIAS command.


On Thu, Mar 10, 2016 at 3:00 PM, praneethvarma
<> wrote:
> I'm building an index on HDFS using the MapReduceIndexerTool which I'd later
> like to load into my Solr cores with minimal delay. With Solr 4.4, I was
> able to switch out the underlying index directory of a core (I don't need to
> keep any of the existing index) and reload the core, and it worked fine. I'm
> upgrading to Solr 4.10.3 which behaves little differently. Upon reload it
> deletes all the index files that are not referenced by the SegmentInfo that
> was in memory (which would not know about the new index files). I end up
> with a clean index directory after reload. To work around this, I'm creating
> a new core with a datadirectory that already has the index I built for the
> same shard and then unloading the original core hoping for this new core to
> become the leader. But the problem here is that the new core gets stuck in
> the recovering state and cannot join the leader election since its state is
> "recovering". However, after one hour, I think (from the logs) is updating
> the status of these cores to "down" and they are brought back up. Then the
> core registers itself as a leader.
> Firstly, I'm trying to force a leader elect (including this recovering
> core).
> Secondly, I'm very curious as to what happens every 1 hour (or this is
> probably a timeout). I just want to understand.
> Thirdly, is there a better way to load a pre-built index quickly like
> before?
> Can anyone help me find answers to above questions?
> Thanks in advance
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

View raw message