Right. An HTTP cache will save the last calculated value. You can set an retention limit, like only cache an answer for 4 hours. If a request comes in and the cached value is older than that limit, the cache will send the request through to Solr, get the answer, then cache it.
wunder Walter Underwood wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) > On Oct 18, 2018, at 3:43 PM, Joseph Costello - F&D Reports > <jose...@fdreports.com> wrote: > > Sorry for the late response Walter, but I believe the bottom line of what you > are saying below is that having the data pre calculated (either in Cache or > in database) is faster than calculating the values on the fly. However once > the data is pre calculated using Solr with HTTP Caching will produce the best > performance results. Correct? > > Regards, > > Joe > > Joseph Costello > Chief Information Officer > > F&D Reports | Creditntell | ARMS > =========================== > Information Clearinghouse Inc. & Market Service Inc. > 310 East Shore Road, Great Neck, NY 11023 > email: jose...@fdreports.com | Tel: 800.789.0123 ext 112 | Cell: 516.263.6555 > | www.informationclearinghouseinc.com > > Need Help? Click here to request IT Support. > > > -----Original Message----- > From: Walter Underwood [mailto:wun...@wunderwood.org] > Sent: Wednesday, October 17, 2018 11:35 AM > To: solr-user@lucene.apache.org > Subject: Re: Solr performing Calculations vs. Pulling data Values Directly > >From DB Question > > Instead of putting things in a database, I would put an HTTP cache, like > Varnish, in front of Solr. Then you get the best of both worlds. Fast fetches > for things that have already been calculated and results for any query that > shows up. > > The client does not need special code to get the manually cached values. > Everything is the same kind of HTTP request. > > An HTTP cache is extremely fast, almost certainly faster than a database. > > wunder > Walter Underwood > wun...@wunderwood.org > https://url.emailprotection.link/?aOxxHWms19X_FosFdd-I1waYrAmmgiQjoUY9nT2nRS00~ > (my blog) > >> On Oct 17, 2018, at 8:29 AM, Shawn Heisey <apa...@elyograg.org> wrote: >> >> On 10/17/2018 9:19 AM, Joseph Costello - F&D Reports wrote: >>> >>> Any feedback from the group on the question below. >>> >>> The question was will solr performing distance calculations (10,000++) on >>> the fly, perform faster than SQL query simply pulling pre-calculated >>> distance values directly from the database. >>> >> >> If your database contains pre-calculated values, then pulling those is >> likely to be faster than doing calculations on the fly. Whether that's true >> in practice depends on precisely what kinds of calculation you are doing, >> and what must be done to obtain the values that go into the calculation. >> >> If your database has pre-calculated values, and you need those in search >> results, why not just put the pre-calculated values into your Solr index >> when you build it? One of the key things done with a search engine for >> performance is handling as much as possible at index time, so there's less >> work to do at query time. >> >> Thanks, >> Shawn >>