Sorry, I missed the second part of the mail. This is an example of using the Java API to search for documents:
http://ontotext.com/kim/doc/KimDocs-3.0-EN/SearchForDocumentsExamples.html And you can find another useful examples in the system documentation: http://ontotext.com/kim/doc/KimDocs-3.0-EN/Examples.html hth Philip On Nov 26, 2010, at 2:58 PM, Philip Alexiev @ Ontotext wrote: > Hello Naaman, > > My guess is that this and the previous are connected. So we will look into > this interesting behavior too. Thank you for the feedback. > > Philip > > > On Nov 26, 2010, at 11:58 AM, Naaman Musawwir wrote: > >> Hello Philip, there was another message regarding search. Here it is copied >> >> I have two queries regarding document searching from the repository. >> >> 1. How to search based upon matching feature value e.g. all the >> documents with title matching “some title” >> 2. I am loading documents using DocumentQuery from >> DocumentRepositoryAPI. When I pass an empty query it returns 0 documents >> that is correct as I have deleted all the documents and there are no >> documents in the repository. But when I set a keyword restriction it loads >> all the deleted documents. Please suggest. >> >> I believe second will be fixed with the deletion issues you are working on. >> Please guide about the first one. >> >> Regards, >> Naaman Musawwir. >> From: Philip Alexiev @ Ontotext [mailto:philip.alex...@ontotext.com] >> Sent: Friday, November 26, 2010 2:19 PM >> To: Naaman Musawwir >> Cc: mailing-list mailing-list >> Subject: Re: [Kim-discussion] Help - Adding/Deleting Documents >> >> Hi Naaman, >> >> We managed to reproduce the issue and are currently working on it. We will >> provide you a link to download the fixed version. The fix will definitely go >> into KIM 3.5, which is expected soon. >> >> Greetings >> Philip Alexiev >> Software Engineer, KIM Team >> >> On Nov 25, 2010, at 4:46 PM, Philip Alexiev @ Ontotext wrote: >> >> >> Hi Naaman, >> >> This is interesting behavior. Generally, we don't delete documents in our >> scenarios where we use KIM, so there is a slight possibility that this is a >> bug. I will try to reproduce it. >> >> Thank you for your feedback. >> >> All the best >> Philip Alexiev >> Software Engineer, KIM Team >> >> >> >> On Nov 25, 2010, at 8:51 AM, Naaman Musawwir wrote: >> >> >> 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 >> Kim-discussion@ontotext.com >> http://ontotext.com/mailman/listinfo/kim-discussion >> >> _______________________________________________ >> Kim-discussion mailing list >> Kim-discussion@ontotext.com >> http://ontotext.com/mailman/listinfo/kim-discussion >> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.872 / Virus Database: 271.1.1/3277 - Release Date: 11/26/10 >> 04:47:00 >> >> _______________________________________________ >> Kim-discussion mailing list >> Kim-discussion@ontotext.com >> http://ontotext.com/mailman/listinfo/kim-discussion > > _______________________________________________ > Kim-discussion mailing list > Kim-discussion@ontotext.com > http://ontotext.com/mailman/listinfo/kim-discussion
_______________________________________________ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion