Closed (fixed)
Project:
Drupal core
Version:
4.5.5
Component:
search.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Jun 2005 at 15:16 UTC
Updated:
10 Oct 2005 at 22:20 UTC
Jump to comment: Most recent file
In some cases, search module doesn't index some words, for instance, when there are only tags between words. In that case they are indexed all together:
This is part of a real node text in one of my web pages (in catalan):
1732/1735<br\><b>Instrumentació:</b>
this got indexed like this in the search_index table:
17321735instrumentació 169 1
which means I couldn't get a search result over 'instrumentació'
I fixed that by adding a white space into the code of search.moulde file:
original file (lines 253-254):
// Strip heaps of stuff out of it.
$wordlist = preg_replace("'<[\/\!]*?[^<>]*?>'si", '', $wordlist);
fixed file (lines 253-254):
// Strip heaps of stuff out of it.
$wordlist = preg_replace("'<[\/\!]*?[^<>]*?>'si", ' ', $wordlist);
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | search.module_0.patch | 607 bytes | robertgarrigos |
Comments
Comment #1
benshell commentedHave you tried this on 4.6.x? I read this issue because I'm also having search indexing problems, but this particular problem looks like it has been fixed on 4.6.1. On line 344 on the search.module, I'm reading this:
Comment #2
robertgarrigos commentedNo, I haven't. The web page I was having this problem is on a shared server running php 4, thus no way to get drupal 4.6 on it.
Comment #3
robertgarrigos commentedComment #4
robertgarrigos commentedThis is not yet fixed with 4.5.5. Apparently there is no problem with 4.6.x versions.
Comment #5
robertgarrigos commentedI enclose a patch for this.
Please, forgive me if this is not the right way of doing. It's the first time I'm using cvs with my macosx. Also the first time I'm using diff to get a patch file, so take it as a simple "hello world" patch file, which should work and fix the problem anyway.
Comment #6
dries commentedRobert: your patch looks OK, but I'll let Steven (UnConeD) review it.
Comment #7
Steven commentedThis patch fixes the described issue, but do we want to be bothered maintaining 4.5 search? It's pretty darn crappy.
Comment #8
robertgarrigos commentedYou might be right. I was keeping one of my sites on 4.5.5 because I missunderstud the system requirements: drupal 4.6.x can in fact run on php4 (!).
However, if you keep updating 4.5.x due to security wholes for people runing < php 4.3.3 I think it pays to debug that crappy search module ;-)
Comment #9
dries commentedCommitted to DRUPAL-4-5. Thanks.
Comment #10
(not verified) commentedComment #11
(not verified) commentedComment #12
(not verified) commented