Loading...
 
Skip to main content

Features / Usability


Search Index not working for msdoc

I'm running a Linux server and Tikiwiki 5.1 and trying to use search indexing to search within uploaded files.

This is working fine for other mime types but not MS Word documents. E.g.

"application/pdf" works using "pdftotext %1 -" as it's file handler
and
"application/vnd.ms-excel" works with "strings %1".

I've tried using strings and catdoc, but neither are populating the the search_data field in the tiki_files table. I've tried reindexing and re-uploading the file.

Both strings and catdoc work successfully from the command line so I'm inclined to write a script to run the commands from cron and update the data into the database. But this is obviously a bit of a bodge so I'd rather have it done natively.

Any ideas?

I understand the moderators are pretty busy, and I've needed to get this complete quickly, so I've created a script which runs from cron and updates the database.

I've also made it work for the OpenOffice opendocument format and the Microsoft openxmlformats filetypes.

I'd still appreciate it if someone can come back to me on a proper fix, but in the meantime, if anyone else is having the same problem the scripts are attached.


to do the same with .pptx files include the following into cat_openformat:


elif -d %22.dir/ppt%22; then
tidy -q -xml -utf8 < $1.dir/docProps/app.xml