Hi, all:

Sorry for the late response: )
Thanks for your reply.

I think Solr Replication may not help in my case, as the central server
would store all docs of all users(1000+), and in each client, I only want to
copy index of his/her docs created or changed in last 2 weeks(for example),
after the first import, make a delta-import each day to get the changed or
deleted index from remote central server.

In my current implementation, I use DataImportHandler and
SOlrEntityProcessor, in short:

I write a new request handler: ImportLocalCacheHandler, url: /importcache
for first import, I call
/importcachequery?command=full-import&from:jeffery&first_index_time={first_index_time}
In my ImportLocalCacheHandler, I will build a query, such as
query=from:jeffery&last_modified:{first_index_time TO NOW}, and then call
/dataimport?command=full-import&query:{previous_query}.
After it succeeds, save last_index_time to a property file.
 
for delta-import, I call /importcachequery?command=delta-import
In my ImportLocalCacheHandler, I will build a query like
"from:jeffery&last_modified:{last_index_time TO NOW}
and call /dataimport?command=full-import&clean=false&query={previous_query}.

This will import index of docs created or changed between last_index_time TO
NOW.

But Now I am trying to figure out how to remove the index from local cache
server that are alredy deleted in remote server but still exist in local
cache.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-import-a-part-of-index-from-main-Solr-server-based-on-a-query-to-another-Solr-server-and-then-tp4013479p4015633.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to