http://qs321.pair.com?node_id=620544


in reply to Re^2: Running SuperSearch off a fast full-text index.
in thread Running SuperSearch off a fast full-text index.

KinoSearch 0.20's RangeFilters are mostly implemented in C and are optimized for low cost over multiple searches.

The first time you search with a sort or range constraint on a particular field, there is a hit as a cache has to be loaded. The cache-loading can be significant with large indexes, but is only felt once if you are working in a persistent environment (mod_perl, FastCGI) and can keep the Searcher object around for reuse.

Once the cache is loaded, RangeFilter is extremely fast. There's an initial burst of disk activity as numerical bounds are found, then the rest is all fetching values from the cache and if (locus < lower_bound) C integer comparison stuff -- no matter how many docs match. There's hardly any overhead added above what's required to match the rest of the query.

--
Marvin Humphrey
Rectangular Research ― http://www.rectangular.com