On 6/1/06, ferret user <[EMAIL PROTECTED]> wrote: > when i use WildQuery ,i was so slowly!! > the query string like this : 'name|title:*test*' > i search field 'name' and 'title' what include string 'test' > it worked ,but too slow
This is not surprising. To run this query Ferret needs to check every single term in the "title" field. > but when i use query string like this : 'name|title:test*' This should be a lot faster. With this query Ferret can scan straight to the point in the index where terms start with the string test and scan through them one by one until they no longer start with test and it's finished. Actually, this query gets optimized to a PrefixQuery. > or 'name|title:*test' it worked fast I'm quite surprised this is much faster. I'd expect it to be a little faster but not by much. Maybe WildCard query can be optimized a little. I'll look into it but don't expect much. The index isn't really built for this type of query. Do you need to run this query often? What exactly are you trying to do? I might be able to come up with a better way to do it. Cheers, Dave _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

