? Success

User tests: Successful: Unsuccessful:

avatar alikon
alikon
4 Oct 2016

Pull Request for Issue #9478 .

Summary of Changes

  • sql bug fix for the postgresql com_finder driver
  • altered fields (title, description) for #__finder_links table
  • removeOrphanNodes() sql rewrite and should be tested on MySQL/MariaDB too

Testing Instructions

  • apply the pr
  • on postgres only go to Extensions > Manage>Database - click on fix
  • enable the smart search content plugin , create/ save an article
  • index content on Smart Search: Indexed Content
  • run the cli finder_index.php script
avatar alikon alikon - open - 4 Oct 2016
avatar alikon alikon - change - 4 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Oct 2016
Category Postgresql SQL Administration Components Installation
avatar joomla-cms-bot joomla-cms-bot - change - 4 Oct 2016
Labels Added: ?
avatar alikon alikon - edited - 4 Oct 2016
avatar alikon alikon - change - 4 Oct 2016
The description was changed
avatar waader
waader - comment - 5 Oct 2016

I did a setup with latest staging, testing data and 4 additional languages. After installation I went in Extensions > Database and it gives me this message:

Table 'kp7cx_finder_links' does not have column 'description' with type text DEFAULT '' NOT NULL. (From file 3.6.3-2016-10-04.sql.)

So I pressed the Fix-Button and I got this syntax error:
Syntaxfehler bei »DEFAULT« LINE 1: ...inder_links" ALTER COLUMN "description" TYPE text DEFAULT ''... ^SQL=ALTER TABLE "#__finder_links" ALTER COLUMN "description" TYPE text DEFAULT '' NOT NULL;

So next I started the indexing process which went fine but at the end I got this syntax error:

FEHLER: Syntaxfehler bei »t« LINE 1: DELETE t FROM "#finder_taxonomy" AS t LEFT JOIN "#... ^SQL=DELETE t FROM "#__finder_taxonomy" AS t LEFT JOIN "#__finder_taxonomy_map" AS m ON m.node_id = t.id WHERE t.parent_id > 1 AND m.link_id IS NULL

Finally I did a search for "test" in the "Indexed Content" and this message appears (operator doesn´t exist: timestamp without timezone ...):

FEHLER: Operator existiert nicht: timestamp without time zone ~~ unknown LINE 4: ...t%' OR "l"."url" LIKE '%test%' OR "l"."indexdate" LIKE '%te... ^ HINT: Kein Operator stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.SQL=SELECT l.,"t"."title" AS "t_title" FROM "#__finder_links" AS "l" INNER JOIN "#__finder_types" AS "t" ON "t"."id" = "l"."type_id" WHERE ("l"."title" LIKE '%test%' OR "l"."url" LIKE '%test%' OR "l"."indexdate" LIKE '%test%') ORDER BY l.title ASC LIMIT 20 FEHLER: Operator existiert nicht: timestamp without time zone ~~ unknown LINE 4: ...t%' OR "l"."url" LIKE '%test%' OR "l"."indexdate" LIKE '%te... ^ HINT: Kein Operator stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.SQL=SELECT COUNT() FROM "#__finder_links" AS "l" INNER JOIN "#__finder_types" AS "t" ON "t"."id" = "l"."type_id" WHERE ("l"."title" LIKE '%test%' OR "l"."url" LIKE '%test%' OR "l"."indexdate" LIKE '%test%') FEHLER: Operator existiert nicht: timestamp without time zone ~~ unknown LINE 4: ...t%' OR "l"."url" LIKE '%test%' OR "l"."indexdate" LIKE '%te... ^ HINT: Kein Operator stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.SQL=SELECT COUNT(*) FROM "#__finder_links" AS "l" INNER JOIN "#__finder_types" AS "t" ON "t"."id" = "l"."type_id" WHERE ("l"."title" LIKE '%test%' OR "l"."url" LIKE '%test%' OR "l"."indexdate" LIKE '%test%')

avatar alikon
alikon - comment - 5 Oct 2016

@waader the goals of this pr are more simple:

  1. let's run index content from Smart Search: Indexed Content
  2. let's save/create an article when the content finder plugin is enabled

a lot of more work need to be done, but this PR only affect postgresql related files so no B/C
i'll continue to work to let the com_finder workable even on Postgresql but i'll submit other PR's shortly

avatar waader
waader - comment - 5 Oct 2016

I understand. So I repeated the test with the same setup but without the multilingual stuff.

ad 1) let's run index content from Smart Search: Indexed Content:
This brings a syntax error at the end: FEHLER: Syntaxfehler bei »t« LINE 1: DELETE t FROM "#finder_taxonomy" AS t LEFT JOIN "#... ^SQL=DELETE t FROM "#__finder_taxonomy" AS t LEFT JOIN "#__finder_taxonomy_map" AS m ON m.node_id = t.id WHERE t.parent_id > 1 AND m.link_id IS NULL

ad 2. let's save/create an article when the content finder plugin is enabled
When saving changes made to an existing article then you get this syntax error:
Save failed with the following error: FEHLER: Syntaxfehler bei »t« LINE 1: DELETE t FROM "#finder_taxonomy" AS t LEFT JOIN "#... ^SQL=DELETE t FROM "#__finder_taxonomy" AS t LEFT JOIN "#__finder_taxonomy_map" AS m ON m.node_id = t.id WHERE t.parent_id > 1 AND m.link_id IS NULL

avatar alikon
alikon - comment - 5 Oct 2016

i'm currently investigating on it .... but i'm afraid that the needed changes to let it work at least with minimal feature should'nt be only on the Postgresql side ..... i'll updated you....

cc26f1f 6 Oct 2016 avatar alikon typo
avatar alikon alikon - change - 6 Oct 2016
The description was changed
avatar alikon alikon - edited - 6 Oct 2016
avatar alikon alikon - change - 6 Oct 2016
Title
[postgresql] - com_finder index content fix
[com_finder] - SQL change for removeOrphanNodes() and postgresql driver fix
avatar alikon alikon - edited - 6 Oct 2016
avatar alikon
alikon - comment - 6 Oct 2016

@waader can you retest ...
now the changes impact Mysql too, so should be tested

avatar alikon
alikon - comment - 7 Oct 2016

Can we not make this query use JDatabaseQuery?

no cause i'm lazy ?
query rewritten using 3 JDatabaseQuery objects

avatar alikon alikon - change - 8 Oct 2016
The description was changed
avatar alikon alikon - edited - 8 Oct 2016
avatar alikon
alikon - comment - 15 Oct 2016
  • added the missed REINDEX
  • removed unnecessary clear()
avatar chrisdavenport chrisdavenport - test_item - 18 Oct 2016 - Not tested
avatar chrisdavenport
chrisdavenport - comment - 18 Oct 2016

I have not tested this item.

I've tested with MySQL and it works fine. I haven't tested on PostGres which is why I'm not marking this as a successful test.

I created a category called "Test", then created an article in that category.
I checked that a taxonomy for the Test category had been created and the article was correctly indexed.
I deleted the article (and emptied the trash). This would trigger the removeOrphanNodes method to remove the Test category taxonomy.
I did not get any errors, the Test category taxonomy had been removed and the index had been updated correctly.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12313.

avatar csthomas
csthomas - comment - 1 Feb 2017

I have tested this item successfully on fe8a684

I tested successful on PostgresSQL based on test instruction. Button Index and clear index also works.

Unrelated errors:

  • search text field does not work: ERROR: operator does not exist: timestamp without time zone ~ unknown LINE 4: ...e%' OR "l"."url" LIKE '%lime%' OR "l"."indexdate" LIKE '%li... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts

  • administrator/index.php?option=com_finder&view=maps: ERROR: column "s.count_published" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT a.,s.count_published,s.count_unpublished,COUNT(b.id)... ^ ERROR: column "s.count_published" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT a.,s.count_published,s.count_unpublished,COUNT(b.id)... ^ ERROR: column "s.count_published" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT a.*,s.count_published,s.count_unpublished,COUNT(b.id)... ^


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12313.
avatar csthomas csthomas - test_item - 1 Feb 2017 - Tested successfully
avatar waader
waader - comment - 2 Feb 2017

I have tested this item successfully on fe8a684

Works with postgres, thanks Alikon!

installation/sql/postgresql/joomla.sql needs an update.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12313.

avatar waader waader - test_item - 2 Feb 2017 - Tested successfully
avatar infograf768 infograf768 - change - 16 Feb 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 16 Feb 2017

RTC as 2 good testers.

Note: last comment is
"installation/sql/postgresql/joomla.sql needs an update."


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12313.

avatar joomla-cms-bot joomla-cms-bot - edited - 16 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - change - 16 Feb 2017
Category Postgresql SQL Administration Components Installation Postgresql SQL Administration com_admin com_finder Installation Components
avatar rdeutz rdeutz - change - 22 Feb 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-22 16:58:15
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 22 Feb 2017
avatar rdeutz rdeutz - merge - 22 Feb 2017

Add a Comment

Login with GitHub to post a comment