Attachment Indexing module.
Hello all, I am currently writing an attachment indexing module. I've tried the swish-e module (and even converted it to 4.7) but it doesn't do what I would like it to do. I want all my search results to be integrated, not in separate tabs. So far I've created all the back end administration interface and I am now moving on to the actual work part but I am having problems with the file revisioning system. I need some clarification of the file and file_revisions table so I can write some more specific SQL. I would only like to index attachments if they are listed on the node but I have no idea how the 'list' column of file_revisions controls this behaviour. It seems that if it is a '0' then it isn't listed, but if it is anything else, it is. Is this correct? I realise that I also need to look at how flexinode handles its file uploads so that these can be indexed too. Is there any documentation on the structure of the DB? as I cannot find any and it would help. Thanks Adam P.S. If this is the wrong list then apologies. I could not find a module development list.
I am currently writing an attachment indexing module. I've tried the swish-e module (and even converted it to 4.7) but it doesn't do what I would like it to do. I want all my search results to be integrated, not in separate tabs.
also see upload_indexer module in contrib. it might just do what you want.
On 9-Mar-06, at 11:14 AM, Moshe Weitzman wrote:
I am currently writing an attachment indexing module. I've tried the swish-e module (and even converted it to 4.7) but it doesn't do what I would like it to do. I want all my search results to be integrated, not in separate tabs.
also see upload_indexer module in contrib. it might just do what you want.
Couldn't the swish-e module be used to extend the search API and have results "in line"? Sounds easier than writing a completely new module... -- Boris Mann Vancouver 778-896-2747 San Francisco 415-367-3595 SKYPE borismann http://www.bryght.com
The swish-e module uses an external program to do the indexing and searching. I want to use the built in drupal search module. If only because it offers the ability to throttle the number of nodes indexed in a single session. IMHO there was not really any need to use swish-e in the first place, as the majority of the grunt work is done by other programs that convert given files into text. i.e. pdf2html and catdoc. The same converted text can be passed to the drupal indexer and youcan gain all the benefits that that offers. What swish-e does gain you is the ability to have a separate search tab especially for files. Though all files in 'files/' are indexed, listed or not. Thanks Adam On 3/9/06, Boris Mann <boris@bryght.com> wrote:
On 9-Mar-06, at 11:14 AM, Moshe Weitzman wrote:
I am currently writing an attachment indexing module. I've tried the swish-e module (and even converted it to 4.7) but it doesn't do what I would like it to do. I want all my search results to be integrated, not in separate tabs.
also see upload_indexer module in contrib. it might just do what you want.
Couldn't the swish-e module be used to extend the search API and have results "in line"? Sounds easier than writing a completely new module...
-- Boris Mann Vancouver 778-896-2747 San Francisco 415-367-3595 SKYPE borismann http://www.bryght.com
Thanks for the pointer. I had no idea where to look for 'contrib' so I had a rummage through cvs and found it. It seems that a lot of the projects in cvs aren't listed on the projects->cvs page. I've had a look at the upload_indexer module and it does fit my needs quite closely, however it would need to be converted to 4.7 and IMHO my current backend interface is quite a bit more polished and useable. It's a bit of a halfway house, do I take the indexing functions from the upload_indexer module and add them to my module or take my interface and add it to the upload_indexer module :-$. + I want to add flexinode upload indexing so I so that would mean even more modifications to the current module, whereas mine is already halfway there. Any hints on listed vs. unlisted files? Thanks Adam On 3/9/06, Moshe Weitzman <weitzman@tejasa.com> wrote:
I am currently writing an attachment indexing module. I've tried the swish-e module (and even converted it to 4.7) but it doesn't do what I would like it to do. I want all my search results to be integrated, not in separate tabs.
also see upload_indexer module in contrib. it might just do what you want.
Hello, I'd say that the list column of each file corresponds either to the file id or is 0 if the user has chosen to not list file. The reason why it's not 1 if it is listed is probably for sorting purposes (so that later uploaded files are displayed at the bottom). However, I'm not quite sure about that. Correct me if I am wrong. Konstantin 2006/3/9, Adam Cooper <adam.j.cooper@gmail.com>:
Thanks for the pointer. I had no idea where to look for 'contrib' so I had a rummage through cvs and found it. It seems that a lot of the projects in cvs aren't listed on the projects->cvs page.
I've had a look at the upload_indexer module and it does fit my needs quite closely, however it would need to be converted to 4.7 and IMHO my current backend interface is quite a bit more polished and useable. It's a bit of a halfway house, do I take the indexing functions from the upload_indexer module and add them to my module or take my interface and add it to the upload_indexer module :-$.
+ I want to add flexinode upload indexing so I so that would mean even more modifications to the current module, whereas mine is already halfway there.
Any hints on listed vs. unlisted files?
Thanks Adam
On 3/9/06, Moshe Weitzman <weitzman@tejasa.com> wrote:
I am currently writing an attachment indexing module. I've tried the swish-e module (and even converted it to 4.7) but it doesn't do what I would like it to do. I want all my search results to be integrated, not in separate tabs.
also see upload_indexer module in contrib. it might just do what you want.
On Thu, 2006-03-09 at 18:30 +0000, Adam Cooper wrote:
Hello all,
So far I've created all the back end administration interface and I am now moving on to the actual work part but I am having problems with the file revisioning system. I need some clarification of the file and file_revisions table so I can write some more specific SQL.
I would only like to index attachments if they are listed on the node but I have no idea how the 'list' column of file_revisions controls this behaviour. It seems that if it is a '0' then it isn't listed, but if it is anything else, it is. Is this correct?
You are correct, and the join for a node is something like SELECT * FROM {files} f INNER JOIN {file_revisions} r ON f.fid = r.fid WHERE r.vid = %d and r.list != 0 You could always just use upload_load($node) foreach ($node->files as $file) { if ($file->list) { //do your thing } }
Is there any documentation on the structure of the DB? as I cannot find any and it would help.
Thanks Adam
P.S. If this is the wrong list then apologies. I could not find a module development list.
I'm almost there with this. I've got stuck on one final part though. How do I convert my drupal path ('files/filename.file') to a system path ('C:\drupal\files\filename.file'). I've tried file_create_path() and that doesn't seem to work. It returns a drupal path. Thanks Adam
participants (5)
-
Adam Cooper -
Boris Mann -
Darrel O'Pry -
Konstantin Käfer -
Moshe Weitzman