Holen@Blog

Holen Bolg on Donews.net

  DonewsBlog  |  Donews首页  |  Donews社区  |  Donews邮箱  |  我的首页  |  联系作者  |  聚合   |  登录
  216篇文章 :: 0篇收藏:: 353篇评论:: 6个Trackbacks

公告

Free Counters

文章

收藏

相册

我的原创文章

存档


正在读取评论……


This is done with the IndexReader.delete() method (this is not a typo, yes, the IndexReader is also used to modify the index). The delete() method has two forms, one that accepts a document index and another that accepts a Term argument.

The delete(int) method is used when the sequential number of the document to be deleted within the index is known. For example, when iterating the document list and deleting documents that match certain criteria, the sequential number of the current document is available for the document number iterator.

The delete(Term) method can be used when a term that matches exactly the document(s) you want to delete can be specified. For example, if you know the location (URL) of the document, you can use it to delete the document of that location. Or, if you want to delete all the documents from a specific site, have in your index a 'site' field that contains the host name of the site so you can delete all the documents of that site in a single and quick operation.



Trackback: http://tb.donews.net/TrackBack.aspx?PostId=123042


[点击此处收藏本文]  发表于2004年10月08日 10:56 AM




正在读取评论……

发表评论

大名:
网址:
验证码
评论