It means that if topic is viewed 1000 times ES will index it 1000 times. And if I have a lot of users many documents will be indexed again and again. This is first strategy.
The second strategy, as I think is to take some fields of topic from index and some from database. At this case I take viewAcount from DB. However, then I can store all fields in DB and use index only as INDEX - to get ids of current topic.
Are there better strategies? What is the best way to solve such problem?
Best best is to try to separate hot and cold/warm data so you are only
updating things which need to be updated.
It may make sense to split this out into different systems, but this is
really up to you.
I have forum. And every topic has such field as viewCount - how many times
topic was viewed by forum users.
I wanted that all fields of topics were taken from ES
(id,date,title,content and viewCount). However, this case after every topic
view ES must reindex entire document again - I asked the question about
particial update at stack - java - Partial update on field that is not indexed - Stack Overflow
.
It means that if topic is viewed 1000 times ES will index it 1000 times.
And if I have a lot of users many documents will be indexed again and
again. This is first strategy.
The second strategy, as I think is to take some fields of topic from index
and some from database. At this case I take viewAcount from DB. However,
then I can store all fields in DB and use index only as INDEX - to get ids
of current topic.
Are there better strategies? What is the best way to solve such problem?
Best best is to try to separate hot and cold/warm data so you are only updating things which need to be updated.
It may make sense to split this out into different systems, but this is really up to you.
On 25 March 2015 at 04:28, Александр Свиридов < ooo_saturn7@mail.ru > wrote:
I have forum. And every topic has such field as viewCount - how many times topic was viewed by forum users.
I wanted that all fields of topics were taken from ES (id,date,title,content and viewCount). However, this case after every topic view ES must reindex entire document again - I asked the question about particial update at stack - java - Partial update on field that is not indexed - Stack Overflow .
It means that if topic is viewed 1000 times ES will index it 1000 times. And if I have a lot of users many documents will be indexed again and again. This is first strategy.
The second strategy, as I think is to take some fields of topic from index and some from database. At this case I take viewAcount from DB. However, then I can store all fields in DB and use index only as INDEX - to get ids of current topic.
Are there better strategies? What is the best way to solve such problem?
Best best is to try to separate hot and cold/warm data so you are only
updating things which need to be updated.
It may make sense to split this out into different systems, but this is
really up to you.
I have forum. And every topic has such field as viewCount - how many times
topic was viewed by forum users.
I wanted that all fields of topics were taken from ES
(id,date,title,content and viewCount). However, this case after every topic
view ES must reindex entire document again - I asked the question about
particial update at stack - java - Partial update on field that is not indexed - Stack Overflow
.
It means that if topic is viewed 1000 times ES will index it 1000 times.
And if I have a lot of users many documents will be indexed again and
again. This is first strategy.
The second strategy, as I think is to take some fields of topic from index
and some from database. At this case I take viewAcount from DB. However,
then I can store all fields in DB and use index only as INDEX - to get ids
of current topic.
Are there better strategies? What is the best way to solve such problem?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.