|
|
-
Delete Indexed from Merged DocumentKarthik N S 2004-06-24, 06:05
Hello Mr Wolf-Dietrich Materna Apologies on delay reply. I would like to have more of u' Help in this matter, Let me Explain the Setup I am Using in here... 1) I have "X" number of Unique Folders Which have around 50,000 Unique named HTML Files. 2) The Indexing Field factor for each File in each folder is done on basis of A)Name of File, B)Last modified Date C)Content of the file D)Folder in which the File is avaliable. At the end of the Week, Every Unique Indivigual Folder is Indexed Indivigually in seperate folder. And at the end of Month These Unique Indexed Folders are Merged into one file. So in any case If Iwant to Update the Existing Merged Folder,I have to first delete from the Merged index on the basis of Field type ( D as mentioned above) factor which is the Unique Folder name, So u mean to say if I Delete from merged Index on the basis of D, and researching of the Merged Index for the same ,the hits should return me 0 hits. Please advise me in this regard if I am not correct.... Thx in advance -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 23, 2004 6:41 PM To: [EMAIL PROTECTED] Subject: AW: Delete Indexed from Merged Document Hello, > Karthik N S [mailto:[EMAIL PROTECTED]] wrote: > Hi > Mr Wolf Wolf-Dietrich is my first name, so leave out Mr. or use my family name (which is uncommon here). > What is this > > // remove the document from index > int docID = hits.id(0); > > and can I increment the "0" factor in the bracket ...for deletion Yes, but there is no reason to do this in this case. You search for documents using their file name (including their full path!). You get a result (some kind of list). Please read Java-Docs about Hits class. hits.id(0) returns the (internal) ID of the first hit in your result. This is the document that you want to remove (using indexReader.delete(...).). There are no more documents in your result "hits" unless your key is not unique. hits.length() returns 0 or 1. Regards, Wolf-Dietrich Materna --------------------------------------------------------------------- --------------------------------------------------------------------- |