On Fri, Apr 18, 2008 at 12:36:53PM +0200, Tom Castle wrote:
> Hi, I've got a Ferret index which I'm using through ActsAsFerret on a
> database with about 300,000 records. Searches on the index (for example
> wildcard - "A*") seem to be truncated at 512 results. This is a problem
> as I also pass conditions to ActiveRecord which filter this resultset
> down, often to zero results when in fact the database contains many
> records which matched the conditions but just happened to be outside the
> 512 Ferret return.
> 
> I thought the solution would be setting max terms to a higher value,
> with something like - Ferret::Search::MultiTermQuery.default_max_terms =
> 5000, however this seems to have no effect. Is there somewhere this
> value is overridden or could there be some other setting which is
> restricting the number of results returned by Ferret?

Yes, most probably it's the boolean query's max_clauses option which
defaults to 512.

If you're using the QueryParser, you may pass it :max_clauses => 5000
option to globally raise this for all kinds of queries. There should
also be a max_clauses class method in BooleanQuery.

Cheers,
Jens


-- 
Jens Krämer
Finkenlust 14, 06449 Aschersleben, Germany
VAT Id DE251962952
http://www.jkraemer.net/ - Blog
http://www.omdb.org/     - The new free film database
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to