New table in the DB, or new columns to xwikispace and/or xwikidoc tables
Index the titles in Solr (are the titles already indexed per language in our solr index?) but change all code requiring access to titles without loading the document to use Solr queries (this means potential delays if solr has not indexed yet a title change).
For example move LD to this (there could be a config option to use HQL or Solr for backward compat). Also means that LD won’t contain all the entries until they’ve been indexed by Solr (thinking of a first time XWiki start for example or if the index is deleted and recreated on a large wiki).
Any pros/cons you see about DB vs Solr for the title cache? Any preference?
So at first sight, I’d go for a Solr for title cache, the problem is that AFAIR it’s currently complex to have requests mixing properly DB and Solr and this title cache main usage would be to be displayed in LT with all sorting / filtering capabilities. So it sounds a bit complex to implement if we want to support multiple filters in the same LT without perf issue and with proper handling of pagination.
That’s one usage but we need to take into account other usages. Any code that needs to display lots of titles (and thus shouldn’t have to load all documents just to get the titles).
The LT/LD has this need too (not just for the filtering/ordering but for the title/breadcrumb columns display).
Well if you want filtering/ordering at all in LT/LD with the displayed title, then it cannot be in Solr unless we have some good implementation allowing to mix SQL and Solr query in LT. So I agree we should also think about other usages, but for me this is a strong argument for not going to Solr here. Unless you consider filtering/ordering is not that much important.