Hello.

We are indexing files on the basis of following fields:

1. name
2. content
3. ValidContents.

Now for these fields, following work is done:

a. Field Name : Content -> Indexing complete document. Used for queries such as Boolean/WildCard etc.

b. Field Name : ValidContents -> Indexing each document line by line. Used for performing phrase match, phrase suggestion, infix suggester etc.



Using this MAIN INDEXES, I create indexes for Phrase Match, Did YOu Mean (User supplied files) and infix suggester. Lets name this CHILD INDEXES.

Problem:

Few of the files are now deleted by an operation. So, I wish to delete all indexes which corresponds to these filenames.

I tried using

Term term1=new Term("name","D111-123-987.txt");
Query query = new WildcardQuery(term1);
writer.deleteDocuments(query);

We are not sure, of following:

a. Deleting indexes and documents corresponding to filename will actually delete indexes for particular file name in "Content" and "ValidContents" field inside MAIN INDEXES.

b. Doing this will automatically remove indexes of provided filename from "CHILD INDEXES".

What we are trying here is If I Delete indexes for a file from MAIN INDEXES, then all indexes which are created before using that MAIN INDEX for given filename should also be deleted. THIS WILL ALLOW PHRASES APPEARING AS SUGGESTIONS FROM DELETED FILE TO STOP APPEARING IN SUGGESTION. This is the ideal case.

Any guidance will be highly appreciated.,





--


       Thanks & regards
       /Jugal Kishore Kolariya
       /

Reply via email to