Hello,

 

I am using Kim 3.0 RC4 on Windows and Linux, same configuration with Lucene
database setting and Java API to connect to KIM instance and carry out
operations. While trying to add/delete/load documents I see some
inconsistency in results and need help regarding correct use of the API.

 

Here is what I do and get as a result:

 

DocumentRepositoryAPI apiDR;

 

1.       Create two documents using CorporaAPI.createDocument() and add
those to document repository using apiDR.adDocument() just like given in the
example. Documents added successfully.

2.       Loaded documents using apiDR.getDocumentIds(new DocumentQuery()).
It returned all two documents fine. I also tested using
apiDR.getDocumentCount(new DocumentQuery()). It also gave correct result as
two.

3.       Then I deleted all the documents using
apiDR.clear(DocumentRepositoryAPI.CLEAR_COMMAND_ALL);.

4.       Now I retrieved documents again as step 2 above. There was no
effect on the repository and same two documents were returned. Is it the
correct behaviour?

5.       I tried to delete the documents one by one using
apiDR.deleteDocument(docID). Here are the confusions in this step

a.       I tried to retrieve documents using apiDR.getDocumentIds(new
DocumentQuery()). Behavior is unexpected as it returned 2 documents, but no
document could be loaded using apiDR.loadDocument(docID). I tried to get the
count using apiDR.getDocumentCount(new DocumentQuery()). It returned 2,
also.

b.       I shutdown KIM server and restart. Now I try to retrieve documents
as step 2. Now the deletion seemed to work as the count and list count in
step 2 both were 0?

 

 

Please explain if it is the expected behavior.

 

Regards,

Naaman Musawwir.

 

_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion

Reply via email to