: I'm curious: do you store everything in a database and just use Solr : for indexing/searching, or do you store everything in Solr so that : your search results come back with context? Or something in between? : (I know if you want highlighting you have to store those fields.)
There are really two ways of interpreting your question: one is about the "authoritativeness" of the data, the other is about the "access" of the data. You'd be hard pressed to find a bigger Solr advocate them myself, but I've never encountered a situation where i thought it made sense for Solr to be the authoritative copy of a dataset -- as in: Solr is the primary copy of the data, you might generate other copies in other formats from Solr (ie: HTML pages, RSS feeds, plain text reports, xml dumps, etc..) but Solr is the "master" datastore of record and when you change it every other copy is eventually changed. Solr isn't as well suited to be an authoritative datastore as something like a relational database because "updating" isn't as easy (and "column" based upddates are really hard). I almost always treat a relational DB as the primary copy o the data, and build my SOlr indexes from them (rebuilding from scratch periodically in some cases, or updating "in real time" as updates are made to the DB in others) the second form of your question thought, the question of "access" ... i encourage people to put whatever data they need in Solr to power whatever application you want to power. if you want to search on 10 fields and display 5 on the listing pages and 200 on the "item" pages you really need to store the 10 fields, and i would sugest you store all 200 and power your item pages using Solr as well ... that way you can be certain your data is consistent across all views. it may not be 100% up to date with your authoritative data store in the case of indexing/updating lag, but you don't have to worry about a record which has changed matching on one term that isn't there when you go show the full item because the fields you fetched from your database have changed since the last time you updated/commited on your Solr index. -Hoss