# Newbie question re updates to an indexed DB

**URL:** <https://discuss.elastic.co/t/newbie-question-re-updates-to-an-indexed-db/3562>\
**Category:** Elasticsearch\
**Created:** [November 12, 2010, 1:44pm UTC](https://discuss.elastic.co/t/newbie-question-re-updates-to-an-indexed-db/3562 "2010-11-12T13:44:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jondow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jondow/32/2111_2.png) [@Jondow](https://discuss.elastic.co/u/Jondow)\
**Post date:** [November 12, 2010, 1:44pm UTC](https://discuss.elastic.co/t/newbie-question-re-updates-to-an-indexed-db/3562/1 "2010-11-12T13:44:05Z")

</div>

I read a question a few messages down from this one enquiring as to an  
'update' feature. While I'm not requiring an update feature as such, I  
was wondering what the recommended approach would be to when a DB is  
indexed, and then FK relationships change in the DB i.e. what's the  
most efficient way to update/reindex the index?

I previously posted a comment about my own domain model which consists  
of an Account with 1 or more Profiles which in turn has 0 or more  
Devices. Devices can be moved between Profiles. If I have indexed the  
Device data flattening it out to include the Profile data, what's the  
most efficient way to now update my index? The DB update is as simple  
as:

update device set profile\_id = ? where id in (?, ?, ...?)

Obviously it won't be that simple in the Lucene index. ☹

Thanks,  
Darryl

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:16am UTC](https://discuss.elastic.co/t/newbie-question-re-updates-to-an-indexed-db/3562/2 "2017-07-06T04:16:39Z")

</div>

Closed on July 6, 2017, 4:16am UTC


