Hello all,

We have a Solr/Lucene index for newspaper articles, those articles have associated comments. When searching for articles we want to present the number of comments per article. What we do now is to fetch from the DB the sum of comments for each articleId that Solr returns, but this is bringing the DB to its knees. We would like to store the number of comments in the Solr index to save the DB some work.

Is it possible when updating a numeric field to increment the existing value instead of replacing it with a new value?

The problem we are having is that we can't retrieve the number of comments increment it and update the index because the "actual" value might be uncommitted... is there any other alternative to this problem?

Thanks in advance for any help.

--
Luis Neves

Reply via email to