Hi, I have question about the delete() method docs.

I am re-indexing data on the fly so I would like to delete any existing
indexed data for a particular resource before re-indexing it using
index.delete(id).

The delete() method api doc says:

"Delete the document referenced by the document number id if id is an
integer or all of the documents which have the term id if id is a term..

id:  The number of the document to delete"

I am a little confused by what this means.  At the time of deletion all
I have is my own ID of the resource which was previously indexed in
ferret with my own field :id.  If I supply my own ID will the correct
indexed data be deleted?  Or does this ID refer to ferrets own internal
ID for the resource?

One other question while I am on the subject - will deleting a resource
that does not exist raise an error.  I ask this because I would like to
index new data structures that haven't been indexed before and would
like to avoid checking in the index first whether or not it exists
before attempting to delete.

Thanks,

Chad.

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

Reply via email to