Hi, i like to index most of my model fields, but limit the search only to a (changing) subset of this fields. -- Posted via http://www.ruby-forum.com/.
In QueryParser you can specify a :fields => [allyourfieldsyouwanttoquery] option to choose which fields you want to be searchable. I believe this is what you want to do. John On 8/23/07, Otmar Tschendel <otmar.tschendel at philips.com> wrote:> > Hi, > > i like to index most of my model fields, but limit the search only to a > (changing) subset of this fields. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ferret-talk/attachments/20070823/dd7e8bb6/attachment.html
On Thu, Aug 23, 2007 at 07:33:28PM -0500, John Aughey wrote:> In QueryParser you can specify a :fields => [allyourfieldsyouwanttoquery] > option to choose which fields you want to be searchable. I believe this is > what you want to do. > > John > > On 8/23/07, Otmar Tschendel <otmar.tschendel at philips.com> wrote: > > > > Hi, > > > > i like to index most of my model fields, but limit the search only to a > > (changing) subset of this fields.you can also specify a list of fields in your queries: field1|field2|anotherfield:query_string Jens -- Jens Kr?mer http://www.jkraemer.net/ - Blog http://www.omdb.org/ - The new free film database
John Aughey wrote:> In QueryParser you can specify a :fields => > [allyourfieldsyouwanttoquery] > option to choose which fields you want to be searchable. I believe this > is > what you want to do. > > JohnAll fields should be searchable. But i like to decide in which fields to search at a give point in time. -- Posted via http://www.ruby-forum.com/.
Jens Kraemer wrote:> On Thu, Aug 23, 2007 at 07:33:28PM -0500, John Aughey wrote: >> > i like to index most of my model fields, but limit the search only to a >> > (changing) subset of this fields. > > you can also specify a list of fields in your queries: > > field1|field2|anotherfield:query_string > > Jens > > -- > Jens Kr?mer > http://www.jkraemer.net/ - Blog > http://www.omdb.org/ - The new free film databaseThanks Jens, that exactly was my problem. It''s working now. -- Posted via http://www.ruby-forum.com/.