jdinunzio
jdinunzio

Reputation: 1618

How to set the value of the catalog's index SearchableText for an object

Is there a programmatic way in which I can set the value of the catalog index SearchableText for an specific object?

I'm using wsapi4plone to upload files to plone, but it has a bug (already reported) and it doesn't set catalog's SearchableText. I would like to be able to set it myself. I tried reindexObject() but it didn't worked.

Upvotes: 0

Views: 204

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1124848

File object contents need to be transformable; the portal_transforms tool needs to be able to produce text from their binary contents.

For PDF files, for example, the pdf_to_text transform either uses the poppler or the xpdf command-line tools to extract text from the document to index. Word documents require the wv package, etc.

You need to make sure the right tools are installed for your platform for these transforms to work.

These older knowledgebase articles still apply to Plone 4:

Upvotes: 1

Related Questions