?
avatar waader
waader
19 Mar 2016

Steps to reproduce the issue

With the latest staging branch and sample data installed try to start the smart search indexer.

Expected result

Indexes the content successfully.

Actual result

Throws this message:

An Error Has Occurred

FEHLER: NULL-Wert in Spalte »term_id« verletzt Not-Null-Constraint DETAIL: Fehlgeschlagene Zeile enthält (null, null, red, red, 0, 0, 0.20, 1, 0.34, null, *).SQL=INSERT INTO "#__finder_tokens_aggregate" ("term_id", "term", "stem", "common", "phrase", "term_weight", "context", "context_weight", "language") SELECT t.term_id, t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, ROUND( t1.weight * COUNT( t2.term ) * 1.700000, 8 ) AS context_weight, t1.language FROM ( SELECT DISTINCT t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language FROM "#__finder_tokens" AS t1 WHERE t1.context = 1 ) AS t1 JOIN "#__finder_tokens" AS t2 ON t2.term = t1.term LEFT JOIN "#__finder_terms" AS t ON t.term = t1.term WHERE t2.context = 1 GROUP BY t1.term, t.term_id, t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language ORDER BY t1.term DESC

System information (as much as possible)

Additional comments

avatar waader waader - open - 19 Mar 2016
avatar brianteeman brianteeman - change - 19 Mar 2016
Category Postgresql
avatar brianteeman brianteeman - change - 19 Mar 2016
Status New Confirmed
avatar brianteeman
brianteeman - comment - 19 Mar 2016

Confirmed


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

avatar brianteeman
brianteeman - comment - 19 Mar 2016

Error message in english

ERROR: null value in column "term_id" violates not-null constraint DETAIL: Failing row contains (null, null, uncategorised, uncategorised, 0, 0, 0.87, 1, 1.48, null, *).SQL=INSERT INTO "#__finder_tokens_aggregate" ("term_id", "term", "stem", "common", "phrase", "term_weight", "context", "context_weight", "language") SELECT t.term_id, t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, ROUND( t1.weight * COUNT( t2.term ) * 1.700000, 8 ) AS context_weight, t1.language FROM ( SELECT DISTINCT t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language FROM "#__finder_tokens" AS t1 WHERE t1.context = 1 ) AS t1 JOIN "#__finder_tokens" AS t2 ON t2.term = t1.term LEFT JOIN "#__finder_terms" AS t ON t.term = t1.term WHERE t2.context = 1 GROUP BY t1.term, t.term_id, t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language ORDER BY t1.term DESC


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

avatar brianteeman brianteeman - change - 19 Mar 2016
Labels Added: ?
avatar wilsonge
wilsonge - comment - 20 Mar 2016

@alikon want to take a shot at this?

avatar alikon
alikon - comment - 21 Mar 2016

@wilsonge i'll look at but sounds like "mission impossible"

avatar Burnardo
Burnardo - comment - 22 Mar 2016

Most probably a related error occurs when Smart Search is asked to clean present index and start re-indexing.

Error message in english:

The table '#__finder_tokens' is full SQL=INSERT INTO #__finder_tokens (term,stem,common,phrase,weight,context,language) VALUES ('id', 'id', 0, 0, 0.1333, 2, '*'), [here an entire list of index-items follows...]

Hope a more clear hint to the cause can be found, by this error.
Ben


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

avatar chrisdavenport
chrisdavenport - comment - 22 Mar 2016

@Burnardo What is the Memory Table Limit set to? You can find it in Components -> Smart Search, then click on Options, then under the Index tab.

The default is 30000. Try setting it to something smaller, like 20000. The indexing process may run more slowly, but do you get the same error now?

avatar Burnardo
Burnardo - comment - 22 Mar 2016

Tested again with Memory Table set to 20000... The problem as described ( The table '#__finder_tokens' is full SQL=INSERT INTO...) did NOT re-occur.

Ben


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

avatar chrisdavenport
chrisdavenport - comment - 22 Mar 2016

That's not the same issue then. Perhaps 3.5 requires a bit more memory and it's tipped you over the edge regarding the amount of memory available for in-memory tables. By reducing the maximum number of rows in the temporary tables you've brought it back down to something your system can handle.

avatar Burnardo
Burnardo - comment - 22 Mar 2016

No, I can see now it is not the same issue. Even worse.... after now changing the Memory Table back to its original value of 30000, my problem did also Not re-occur.
Thanks for your time and explanation, though.
Ben


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

avatar brianteeman
brianteeman - comment - 5 Aug 2016

Re-tested on 3.6.2 with Postgres and still get an error

An Error Has Occurred
ERROR: null value in column "term_id" violates not-null constraint DETAIL: Failing row contains (null, null, uncategorised, uncategorised, 0, 0, 0.87, 1, 1.48, null, *).SQL=INSERT INTO "#__finder_tokens_aggregate" ("term_id", "term", "stem", "common", "phrase", "term_weight", "context", "context_weight", "language") SELECT t.term_id, t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, ROUND( t1.weight * COUNT( t2.term ) * 1.700000, 8 ) AS context_weight, t1.language FROM ( SELECT DISTINCT t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language FROM "#__finder_tokens" AS t1 WHERE t1.context = 1 ) AS t1 JOIN "#__finder_tokens" AS t2 ON t2.term = t1.term LEFT JOIN "#__finder_terms" AS t ON t.term = t1.term WHERE t2.context = 1 GROUP BY t1.term, t.term_id, t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language ORDER BY t1.term DESC


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

avatar jimhill10
jimhill10 - comment - 2 Sep 2016

I am having this issue on 3.6.2 as well. I attempted to save an existing article. Went in and changed that index setting from 30000 to 20000 and was at least able to save. When I post a new article and then update it I see an error "alias already exists."

avatar waader
waader - comment - 26 Feb 2017

This one can be closed as the patch from alikon resolved the problem.

avatar wilsonge wilsonge - change - 26 Feb 2017
The description was changed
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2017-02-26 12:59:20
Closed_By wilsonge
avatar wilsonge wilsonge - close - 26 Feb 2017
avatar wilsonge
wilsonge - comment - 26 Feb 2017

Thanks!

Add a Comment

Login with GitHub to post a comment