Index'd results not appearing in search

natebsi - July 31, 2007 - 22:23
Project:Swish-E Indexer
Version:5.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

I'm trying to get swish-e working a plain vanilla drupal 5.2. I uploaded a few docs, and when I start swish-e indexing, I see this:

Indexing done!
Elapsed time: 00:00:00 CPU time: 00:00:00
5 files indexed. 115,957 total bytes. 1,048 total words.

Your Swish-E settings has been saved.

Those 5 files are 2 .doc files and 3 .txt files. But I when I do a search, nothing comes up. I am searching for fairly simple words that I know are in those files, like oracle and upload.

Any thoughts? Is there something else in, maybe with drupal itself, that needs be done in addition to the swish-e indexing?

Thanks!
-nate

#1

populist - March 7, 2008 - 19:11

You should be OK if swish is picking up the different files. If this hasn't been resolved, upload a copy or two of the files you are looking at and that could be of more help. Also look in the swish_fulltext table to see if the fulltext is being properly generated. Sometimes the files can get corrupted or have the data stored in wierd ways depending on how your input filters are configured.

#2

populist - March 7, 2008 - 19:12
Status:active» closed

#3

Marcin Pajdzik - April 4, 2008 - 02:23

Well, I have tried to set up this module. I have uploaded a couple of files, indexed them but they do not appear in the search results. I have checked the database - the fulltext fields are filled with text from the files. Does anyone know how to solve this problem?

#4

Marcin Pajdzik - April 4, 2008 - 02:25
Status:closed» active

Well, I have tried to set up this module. I have uploaded a couple of files, indexed them but they do not appear in the search results. I have checked the database - the fulltext fields are filled with text from the files. Does anyone know how to solve this problem?

#5

Mafue - June 2, 2008 - 10:13

Same problem here. I can see the text of a word doc in the table 'mysite_swish_fulltext,` so it's being indexed, but it doesn't show up when I do a simple search for one of the keywords.

My drupal table names have a prefix, could this be the problem?

EDIT: I'm running version 5.7 of drupal.

#6

berlinonline2 - June 6, 2008 - 11:51

I think I have a solution for your problem if you are using swish-e indexer on a windows system. I had the same issue and after an hour I found out that there was a problem with the Slash/Backslash-Handling in the Code. Try to change the following lines in the files mentioned below. That worked fine for me. Good luck.

In File: swish.integration.inc

Line 13 find
$file_path = getcwd() .'/' . file_directory_path();
and replace with:
$file_path = getcwd() .'\\' . file_directory_path();

Line 59 find
$swish_indx_cmd .= " -f $file_path/my_swish_index"; // save the index to the files directory
and replace with:
$swish_indx_cmd .= " -f $file_path\my_swish_index"; // save the index to the files directory

Line 60 find
exec (escapeshellcmd($swish_indx_cmd), $results, $rv);
and replace with:
exec ($swish_indx_cmd, $results, $rv);

In File: swish.module

Line 61 find
$swish_index = getcwd() .'/' . file_directory_path().'/'. 'my_swish_index';
and replace with:
$swish_index = getcwd() .'\\' . file_directory_path().'\\'. 'my_swish_index';

Line 78 find
$swish_command = variable_get("swish_path","/usr/local/bin/swish-e") . escapeshellcmd(" -m 50 -f $swish_index  -w ").$words;     
and replace with:
$swish_command = variable_get("swish_path","/usr/local/bin/swish-e") . " -m 50 -f $swish_index  -w ".$words;     

After applying the changes go to the config menue for swish-e and try again the "Begin Swish-E Indexing". After that run cron.php and then try a search. In the advanced search menue you will find a tab called "files" an there you can search within the files.

#7

Mafue - June 10, 2008 - 16:59

I'm not saying this is a solution... but we added the search_all module and now files are showing up in our search results (even though they weren't showing up under the files tab before.) Probably a coincedence, but it might help someone.

 
 

Drupal is a registered trademark of Dries Buytaert.