Interestingly, there is the right way to solor documents with synchronization database entries. I usually have problems: there are solr documents, while the referent of database records is missing. It seems that some db entries were deleted, but the trigger did not update solr. I want to write a rake task to delete documents in solr that run periodically.
Any suggestions?
Chamnap
Yes, there is one.
You should use a DataImportHandler with a delta import function.
, , , , . example.
, HTTP , .
Java + Java DB + Lucene ( Solr ) . , ( + ) Lucene Java DB. , -, , , . , . , . , .
Solr db " ". , , . , , .
In addition to the above, soft deletion by setting a column deletedor deleted_atis a great approach. That way, you can run a script to periodically delete deleted records from your Solr index as needed.
deleted
deleted_at
You mention the use of rake tasks - is this the Rails application you are working with? Most Solr clients for Rails applications should support deleting records with after_destroy.
after_destroy
Source: https://habr.com/ru/post/1754189/More articles:How to setup iphone application using twitter? - objective-cPowerbuilder: what does this computed polarizer mean - powerbuilderAndroid ImageButton border? - androidDo I need to shoot internal objects of a COM Interop object? - vb.netGoal C: Different behavior variables in the header file (.h) compared to the implementation file (.m) - objective-cif in mysql - sqlHow can I dry this code? - ruby | fooobar.comHow to parse the contents of a downloaded file in RoR - ruby | fooobar.comhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1754193/rails3-how-to-set-default-conditions-to-hasmany&usg=ALkJrhhO2oZKbdg9iUzbQtOQci-JntfG1AIphone OS 4.0: the application does not fit applicationDidBecomeActive - objective-cAll Articles