Skip to main content

Diigo Home

File: TUTORIAL - The Diigo Meta page

ferret.davebalmain.com/...TUTORIAL.html - Cached

This link has been bookmarked by 7 people . It was first bookmarked on 04 Sep 2006, by Paweł Kruszewski.

  • 20 Aug 07

    • Let‘s go back to the database example above. If we store all of our
      documents with an id then we can access that field using the id. As long as
      we called our id field :id we can do this


        index["89721347"]["title"]


      Pretty simple huh? You should note though that if there are more then one
      document with the same id or key then only the first one will
      be returned so it is probably better that you ensure the key is unique
      somehow. By setting Index‘s :key attribute to :id, Ferret will do this automatically for
      you. It can even handle multiple field primary keys. For example, you could
      set to :key to [:id, :model] and Ferret would keep the documents unique
      for that pair of fields.

  • 19 May 07
  • 09 May 07