I am thinking of implementing Solr for our ecommerce project. What I am trying to achieve is to allow users to search within product title and display the result page showing the product title, product price, availability and short description. Now what I am wondering is, do I store the information I am going to show on the search result page in Solr (ie price, description) or do I just get the product ID from the solr and retrieve the products from the db?
Share
You can do both.
It may be easier for you to implement solution if you store values in Solr and simply retrieve them with search results (although the other option is also very simple to implement).
Whichever way you choose you’ll have to think about synchronization between your db and Solr, so check out these:
http://wiki.apache.org/solr/DataImportHandler#Scheduling
http://wiki.apache.org/solr/NearRealtimeSearch