- Use the CorporaAPI methods to create a document from:
- text - use the one receiving a string content parameter and a Boolean parameter denoting if the text is actually a markup.
- URL - use the one receiving an URL parameter and a string parameter for the encoding to be used.
- Use DocumentReporsitoryAPI for storing documents.
- Use addDocument() method for storing a specific document.
When the document is stored, it is assigned a persistence ID. You can later use the ID to load this document.
Use getDocumentIds() to get documents IDs, when you need to browse documents, based on some search criteria.
This method provides a filter, corresponding to these search criteria. Creating filters is the subject of the Searching for Documents scenario. Here, we focus on how to load documents. When you have the ID list, it is possible to go through it and load the required documents from persistence.
Use syncDocument() to synchronize a document.
If the document already exists, it is updated. If not - it is added to the persistence and indexed.
To remove the document from the persistence repository, you need to pass its ID as a parameter to the deleteDocument() method.