Send contents and files
In the previous section a single object was indexed with title and key. Mindbreeze offers a very easy possibility for the indexing of an object’s content. You can send existing files directly and let the Mindbreeze Filter Service extract all the content from the document. The methods
setExtension are important for this. With
setContent you transmit the bytes of the content. With
setExtension you define the file type of the content. If you enter .doc here, for example, and the word document data contains content then the filter automatically extracts the content and additional information such as the author.
But you can also simply send a string as content.
To sum up, an object’s content is determined with the properties
extension. The content’s data is transmitted in content. The extension txt means that the content is viewed as a text document.