Andreas Korth wrote:
> If you haven't used Ferret's query language before, check out the
> RDoc documentation for Ferret::QueryParser. It's pretty well
> explained there.

Hello,

Thank you, I'm definitely missing this part so far.

As for the advanced search pattern, I'm only worried that my code for 
glueing the query from all sorts of fields will be very complex. That's 
why I'm trying to think of something easier to maintain.

So far I was thinking of a solution going along these lines:
- data from the search form would be used to create a pattern object
- the query would be constructed by iterating through all the 
field_infos of the index
- for each field_info add to the query a pair attribute : value of that 
attribute from the pattern object

I'm considering whether it's a good course to take, seems tempting 
because of its dryness -- no need to alter the search method after 
extending the index. And it would make the search method a few lines 
only, simple loop and not a terrifying sequence of ifs and concats :)

I'm trying to spot the weaknesses of this idea before I start coding. I 
would be happy to hear your thoughts on this idea!


Agnieszka



-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to