Forum: Ferret indexing only the changed values

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
isha kakodkar (Guest)
on 2007-07-30 16:33
(Received via mailing list)
Hi all,
    i have model A which has a field indexed from model B. model A
belongs
to model B.
So whenever i insert a row in model 'A', a query is fired to the field
from
model 'B' even though the data was not changed for the field in model B.
Can i somehow avoid these extra queries,or rather query the data and
index
it,only if the data has been changed>?
e.g model A {
        message
        chat Name
}


model B{
      chat Name
}


For 1 chatName there are 10 messages.so i want to index chatName once
per 10
messages and not 10 times.How do i do this?
Benjamin K. (Guest)
on 2007-07-30 17:26
(Received via mailing list)
Hey..

Ferret does not allow you to update information in
the index. You can either add information or remove
information. There is no SQL-like 'UPDATE'
statement. Ferret or AAF - whatever you use - need
all information, if you want to index something. And
AAF does not keep track of changes in the model,
so it will not allow you to add a flag like
:only_index_dependencies_if_model_really_changed :)

So if you want to avoid your extra queries, build some
caching inside your model classes. This has nothing to
do with Ferret. E.g. try storing your data in a memcache
with a short TTL or think of any other caching mechanism
that will work for your model, regardless of Ferret.


Ben
isha kakodkar (Guest)
on 2007-07-31 10:56
(Received via mailing list)
ok thanks...
Can i specify :group clause while searching....I want to apply a groupBy
clause in sql to get the resultset and index it...
Can i do it with Ferret?
isha kakodkar (Guest)
on 2007-08-08 18:20
(Received via mailing list)
hi,i needed some help on specifying conditions for index searching on
filesystem.
Along with the main query string,i can give the indexed_field:value,so
that
it searches the query string at that indexed row.
But can i specify a indexed_field > value?
or i have to give the exact value?
Jens K. (Guest)
on 2007-08-13 15:00
(Received via mailing list)
On Wed, Aug 08, 2007 at 07:19:25AM -0700, isha kakodkar wrote:
> hi,i needed some help on specifying conditions for index searching on
> filesystem.
> Along with the main query string,i can give the indexed_field:value,so that
> it searches the query string at that indexed row.
> But can i specify a indexed_field > value?
> or i have to give the exact value?

Check out RangeQueries.

http://ferret.davebalmain.com/api/classes/Ferret/Q...


Jens

--
Jens Krämer
http://www.jkraemer.net/ - Blog
http://www.omdb.org/     - The new free film database
This topic is locked and can not be replied to.