Solr updating index -
there around 10 million records in db indexed , glad have done seeing high performance benefits getting records solr instead of db. data used in reporting.
currently keeping flat data in index. example:
itemid, companyname, username, status as item's status change example received sold, call solr api update record. working well. have index updated in realtime, report works well.
question 1: in future lets say, user updated company name company company b, or maybe username mike jimmy, how suppose handle this?
my thoughts
listen user , company update event , update solr indexes name = old name
keep id company , user in index instead of names. , after fetching records solr, hit db again updated name. mixed approach, major fields come index , such fields come db table
question 2: calling solr update update indexes status transistions every call. there better way this? missing in terms of performance hit in future or when frequency of status transitions increase?
question 3: lets say, in future requirement comes show 1 more column in report not yet indexed. whats standard acceptable way doing that?
kindly share expert advice on please.
question 1: in future lets say, user updated company name company company b, or maybe username mike jimmy, how suppose handle this?
we have equal case , did using solr data import handler. on db side added last_modified column. on every update of row, db automatically changed last_modified` timestamps "now".
on solr side run data-import jobs calling data import request handler, that:
http://solrhost:8888/solr/mycore/dataimport?command=full-import&clean=false&optimize=false in case data import request handler runs db query clause on last_modified. take @ this.
for important, have defined unique id on solr, itemid
question 2: calling solr update update indexes status transistions every call. there better way this? missing in terms of performance hit in future or when frequency of status transitions increase?
see question 1. it's alternative way, not sure, if faster.
question 3: lets say, in future requirement comes show 1 more column in report not yet indexed. whats standard acceptable way doing that?
for me is: adding new field solr, restarting solr. reindexing documents. reindexing necessary, if exiting documents additional informations.
Comments
Post a Comment