Search Plugin

sohopros

Member
Hi,

I use Fabrik search plugin on my website.

But when I do the search I am getting an error:

YOU HAVE AN ERROR IN YOUR SQL SYNTAX; CHECK THE MANUAL THAT CORRESPONDS TO YOUR MARIADB SERVER VERSION FOR THE RIGHT SYNTAX TO USE NEAR '(SELECT GROUP_CONCAT(LOOKUP.NAME SEPARATOR '//) AGAINST ('+PRIVACY*' IN BOOLEAN' AT LINE 40

I followed this documentation to set up the search feature: http://fabrikar.com/forums/index.php?wiki/search-plug-in/


I want the search in these 3 fields/elements:
  1. Name
  2. Product Descriptions
  3. Tags
When I remove Product Description and tags from elements then the search is working, but I need these 2 fields also. What could be wrong with these 2 elements?

Are there any other settings for the elements for the search feature?

Please advise,
Sandra
 

Attachments

  • fabrik-search-elements.png
    fabrik-search-elements.png
    81.7 KB · Views: 229
So are you talking about the Fabrik global Joomla search plugin, or the 'search all' feature on lists?

-- hugh
 
OK.

What element types are the three elements? I'll need to duplicate your setup to test it.

Is "Tags" a tag element? I suspect that might be problematic, as it has some very complex code to build search queries in the many-to-many joined table.

-- hugh
 
Hi,

attached screenshot with the elements.

Yes, Tag element uses tag plug-in.

Thanks,
Sandra
 

Attachments

  • name-davis.JPG
    name-davis.JPG
    49.7 KB · Views: 219
  • product-categories-davis.JPG
    product-categories-davis.JPG
    63.7 KB · Views: 217
  • tag-element-davis.JPG
    tag-element-davis.JPG
    53 KB · Views: 362
And is Product Categories a multiselect or checkbox join, rather than a simple dropdown?

Unfortunately, things like that - tags or joins set to a "multi" select (which involves a joined many-to-many table) just aren't going to work with the global search.

The reason being, we use MySQL's "MATCH AGAINST" full text search for this, which can only take simple field name, like ...

Code:
MATCH (table1.field1, table1.field2) AGAINST ("+something" IN BOOLEAN MODE)

... where that first list of fields can only be a simple field name. But the field selector for things like the tags element, and checkbox joins, aren't simple fields, they are subqueries which select the field from the joined many-to-many table

Code:
(SELECT GROUP_CONCAT(tags SEPARATOR '//..*..//') FROM tags_test_repeat_tags WHERE tags_test_repeat_tags.parent_id = `tags_test`.`id`)

... so the MATCH AGAINST ends up being ...

Code:
MATCH ((SELECT GROUP_CONCAT(tags SEPARATOR '//..*..//') FROM tags_test_repeat_tags WHERE tags_test_repeat_tags.parent_id = `tags_test`.`id`),table1.field1, table1.field2) AGAINST ("+something" IN BOOLEAN MODE)

... which is not valid MySQL.

Sorry, but without some major (and I mean seriously major) surgery, and changing the way we handle that searching, it's just not going to work. You are restricted to simple fields, or non-multiple joins (like dropdown).

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top