Getting malformed queries when using CCK fields for search input

randomswathe - June 12, 2008 - 19:47
Project:Views Fast Search
Version:5.x-2.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Great module...I'm having a few problems which may not be bugs, but I can't seem to solve them. I am using fastsearch in conjunction with views_filterblock. I've created a input block at http://ibe.scribeproduction.com. There are a few instances when I get malformed queries when I search on certain words, characters, etc. For instance, when I search on 'baron' in the author field I get an error. Here is the query:

SELECT count(node.nid) FROM node node LEFT JOIN content_type_bep_title node_data_field_bep_author ON node.vid = node_data_field_bep_author.vid WHERE (node.status = '1') AND (node.type IN ('bep_title')) AND (UPPER(node_data_field_bep_author.field_bep_author_value) LIKE UPPER(''node'aron%'))

However, when I search on 'Baron' (capitalized) the query is formed properly. Also an issue with 'business' and 'Business' in the title field. Ideas?

#1

slowlemur - August 26, 2008 - 00:16

I'm seeing the same thing. It seems to be caused by that 'node' being inserted in the last UPPER(''node'aron%')). It looks like the lowercase 'b' is being replaced by 'node'. Oddly enough, I have the same EXACT problem, lowercase b being replaced...

#2

slowlemur - August 26, 2008 - 03:25

After some more searching...I found this:

http://drupal.org/node/165611

It is not a problem with the views fast search, but with the views module. There is a patch that fixes the problem.

#3

randomswathe - September 3, 2008 - 16:25
Status:active» closed

Thanks for passing this along, I never came across the patch when researching this issue. Applied the patch and all is well. Sorry for assuming this was a views_fastsearch issue!

 
 

Drupal is a registered trademark of Dries Buytaert.