On 9/21/06, Sam Giffney <[EMAIL PROTECTED]> wrote: <snip> > 2 - a range search is actually converted into a boolean search > internally (someone please correct me if I got that wrong) so doing a > range search over massive ranges may be problematic by exceeding > accepted query lengths. Then you start a trade off between accuracy > (more decimal places) and speed. The way I got round it was to assume > that for my purposes search only needed to be accurate to about 100m so > formatting longitude/latitude to 3 decimal places would work fine (I > live in a small country :)
This used to be correct, but it is no longer the case in either Ferret or Lucene (version 2.0). RangeQueries get reduced to ConstantScoreQueries which use a Filter. So Sam, you can now feel free to use RangeQueries with as large a Range as you like :-). WildcardQueries, FuzzyQueries and PrefixQueries do however get rewritten as BooleanQueries in Lucene and MultiTermQueries in Ferret so you do need to be careful when using these queries. Ferret's MultiTermQuery is a lot more efficient than a BooleanQuery for this task so it it allows a lot more clauses then you could probably use efficiently in Lucene. Also, the query "*" gets rewritten as a MatchAllQuery so it is safe to use. Cheers, Dave _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

