lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: RequestHandler / function Query with Cache-implementation
Date Thu, 29 Apr 2010 18:42:15 GMT

: Yes, it's really a lot. I am not sure whether an ExternalFileField-source
: would work faster than a SolrCache (a lot of the needed data is always the
: same, so it's okay to store it in an external file). However: is it really
: more performant to get the metadata from there? Did you make any experiences
: here?

ExternalFileField reads the data from the file once (per searcher) and 
then stores it in an internal data structure just like hte FieldCache - so 
it should be just as fast at query time as anything you might write using 
a SolrCache.

The one place where your specific biz logic might make a custom solution 
faster is if you know that typically only some small percentage of the 
values will be changing, and you have a fast way of getting those changes 
-- then you could have a CacheRegenerater that copies everything verbatim 
from the old cache to the new cache, and only overwrites the few values 
you know have changed.  (ExternalFileField has to re-read the entire file 
each time)

: I *think* SolrJ is the right way to get stats and other things about my
: index directly from the server. I just need to query them and store them in
: a cache**. That's all. I can reuse them everytime. In fact I only need SolrJ
: to fill the cache, if it is empty (or a special event gets fired).

Ah, i see what you ment -- you could use SolrJ for this if you wnat the 
logic to live outside Solr, but if you ultimately want the data inside 
solr (in a SolrCache) then i would suggest leaving SolrJ out of it and 
writing your logic directly as a Solr plugin.

: hours today to search for a solution. By the way - do I learn more about
: such special cases if I have a look at "Solr 1.4
: Enterprise-Search-Server-Book" or "Lucene in Action"? It is really

Unfortunately, I'm pretty sure neither book has anything on writing custom 
Solr plugins -- it's really a niche type of thing. (although i have no 
idea if the upcoming LIA2 will cover this topic)

: **before I am going to start writing the first lines of code, I need to know
: about how Solr uses function queries. Is there a new instance of the
: function query per request, per Solr-lifetime, per...what??

the parsers produce new instances as needed, but the ValueSources that 
drive the FunctionQueries tend to be long lived (the most commonly used 
ValueSource is based on the FieldCache)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message