| 1 | = Fast Index Update = |
| 2 | |
| 3 | || '''Date''' || 2012/09/14 || |
| 4 | || '''Contact(s)''' || [http://wiki.osgeo.org/wiki/User:Jeichar Jesse Eichar] || |
| 5 | || '''Last edited''' || || |
| 6 | || '''Status''' || Proposal || |
| 7 | || '''Assigned to release''' || 2.9.x || |
| 8 | || '''Resources''' || Swisstopo || |
| 9 | || '''Code''' || https://github.com/jesseeichar/core-geonetwork/tree/improvement/fastupdate || |
| 10 | |
| 11 | == Overview == |
| 12 | |
| 13 | Currently in order to change any fields in the lucene index the metadata document has to be completely reindexed. This proposal outlines how certain field changes can be efficiently performed. |
| 14 | |
| 15 | The types of actions this would make efficient are: |
| 16 | * Update popularity |
| 17 | * Update privileges |
| 18 | |
| 19 | === Proposal Type === |
| 20 | * '''Type''': Improvement |
| 21 | * '''App''': Geonetwork |
| 22 | * '''Module''': Index |
| 23 | |
| 24 | === Links === |
| 25 | |
| 26 | * '''Email discussions''': |
| 27 | * '''IRC discussions''': |
| 28 | * '''Related work''': |
| 29 | |
| 30 | |
| 31 | === Voting History === |
| 32 | |
| 33 | * None as yet |
| 34 | |
| 35 | ---- |
| 36 | |
| 37 | |
| 38 | == Proposal == |
| 39 | |
| 40 | '''Background''' |
| 41 | |
| 42 | First of all lucene does not support updating a document directly. The normal way of updating a lucene document is to: |
| 43 | |
| 44 | 1. Recreate the lucene document from the source data (in our case the metadata xml) |
| 45 | 1. delete the document from the index |
| 46 | 1. add new (recreated) document to the index |
| 47 | |
| 48 | If the recreation of the lucene document is an expensive operation then performing this task is naturally expensive. There are work arounds for example: |
| 49 | |
| 50 | 1. Load document from index |
| 51 | 1. Modify document |
| 52 | 1. delete document from index |
| 53 | 1. insert modified document to index |
| 54 | |
| 55 | |
| 56 | |
| 57 | === Backwards Compatibility Issues === |
| 58 | |
| 59 | Will require rebuild of index |
| 60 | |
| 61 | == Risks == |
| 62 | |
| 63 | |
| 64 | == Participants == |
| 65 | * As above |