I've recently installed the tripsearch module, and things work well.
But when I try to search something a search therm betwenn two Wildcards like *fl*, I'll get the error message shown below. removing the second * thing work fine again...

Anyway fine module to work with big amounts of data.
best jochen


* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 384.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 390.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 384.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 390.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 384.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 390.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 384.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 390.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 384.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 390.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 384.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 390.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 384.
* warning: Compilation failed: nothing to repeat at offset 2 in /srv/www/vhosts/ocoire.net/httpdocs/modules/trip_search/trip_search.module on line 390.

Comments

mindless’s picture

Title: Error in cas of Wildcard search » Error in case of Wildcard search

Please first try the latest 4.7.x trip_search code, or better yet move to drupal 5.x.
Also see http://drupal.org/node/32370
Looks like we need to edit function trip_search_rank_results and change the two lines that start with preg_match_all('|\b'. $key .'\b|',. Change $key to preg_quote($key) in those two lines. Does this help?

mindless’s picture

Assigned: jo-berger » mindless
Status: Active » Fixed

Fixed on DRUPAL-4-7 and DRUPAL-5 branches. Note that trip_search uses fulltext, so wildcard searches like that don't do anything.. the fix here is to avoid the php warning from such a search.

joel_guesclin’s picture

According to the MySQL manual, it is indeed possible to do wildcard searches using fulltext indexes. At least as I understand it! So, I think that trip_search should also be able to handle these. But clearly a bit more investigation needs doing on whether it is possible to do two wildcards in the same search, and whether it is possible to do a search in trip_search even if it does not use the fulltext index (would be very slow of course). Perhaps an option to say whether or not that is possible?

mindless’s picture

ah, cool.. trailing wildcard does work. i just tried the "both ends" wildcard as in this bug and found it didn't work..

jo-berger’s picture

Version: 4.7.x-1.1 » 4.7.x-1.6

Hi,

i just upgraded to the 4.7.x-1.6 release. No more Problems with Wildcards on my site.
Thank you very much !

Anonymous’s picture

Status: Fixed » Closed (fixed)