Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-02-02 07:28:49

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

[SOLVED] Search results do not appear

My search stopped working for a few weeks now. I’ve been pulling my hair to find out why. I’ve even deleted the code and pasted the one in the txp demo site but it still just returns the number of articles.

The sample code I am using can be found on github for the pages here and the form.

Can anyone spot what I might have done wrong?

Many many thanks

ps. Here is a trace which returns Tag error: <txp:article limit="999" searchall="0" /> -> Textpattern Error: Can't find FULLTEXT index matching the column list while parsing form <strong>None</strong> on page <strong>default</strong>

<txp:if_section name="">
     81.08 |          | 	[true]
     81.09 |   121.04 | 	<txp:if_search>
     81.10 |          | 		[true]
     81.11 |     0.02 | 		<txp:variable name="searchterm_minchars" value="3" />
     81.13 |     0.08 | 		<txp:variable name="searchterm_tooshort">
     81.15 |          | 			[true]
     81.15 |     0.04 | 			<txp:php>
     81.19 |          | 			</txp:php>
     81.21 |          | 		</txp:variable>
     81.21 |   119.88 | 		<txp:article pgonly="1" searchall="0" searchsticky="1" />
     81.41 |          | 			[filterAtts accepted]
     81.59 |   119.41 | 			[SQL: SELECT COUNT(*) FROM textpattern WHERE 1 AND `Posted` <= from_unixtime(2147483647) AND Status >= 4 AND ((`Title` LIKE '%helene%') OR (`Body` LIKE '%helene%') OR (`Excerpt` LIKE '%helene%') OR (`Section` LIKE '%helene%') OR (`custom_1` LIKE '%helene%') OR (`custom_2` LIKE '%helene%') OR (`custom_3` LIKE '%helene%') OR (`custom_4` LIKE '%helene%') OR (`custom_5` LIKE '%helene%') OR (`custom_6` LIKE '%helene%') OR (`custom_7` LIKE '%helene%'))  ]
    201.01 |          | 			[Rows: 1]
    201.11 |     0.19 | 		<txp:if_search_results>
    201.13 |          | 			[true]
    201.16 |     0.07 | 			<txp:page_url type="q" />
    201.24 |     0.06 | 			<txp:search_result_count />
    201.30 |          | 		</txp:if_search_results>
    201.30 |     0.83 | 		<txp:if_variable name="searchterm_tooshort" value="yes">
    201.33 |          | 			[false]
    201.34 |     0.78 | 			<txp:article limit="999" searchall="0" />
    201.52 |          | 				[filterAtts accepted]
    201.60 |     0.37 | 				[SQL: SELECT *, UNIX_TIMESTAMP(Posted) AS uPosted, UNIX_TIMESTAMP(Expires) AS uExpires, UNIX_TIMESTAMP(LastMod) AS uLastMod, MATCH (`Title`, `Body`, `Excerpt`, `Section`, `custom_1`, `custom_2`, `custom_3`, `custom_4`, `custom_5`, `custom_6`, `custom_7`) AGAINST ('helene') AS score FROM textpattern WHERE 1 AND `Posted` <= from_unixtime(2147483647) AND Status IN (4) AND ((`Title` LIKE '%helene%') OR (`Body` LIKE '%helene%') OR (`Excerpt` LIKE '%helene%') OR (`Section` LIKE '%helene%') OR (`custom_1` LIKE '%helene%') OR (`custom_2` LIKE '%helene%') OR (`custom_3` LIKE '%helene%') OR (`custom_4` LIKE '%helene%') OR (`custom_5` LIKE '%helene%') OR (`custom_6` LIKE '%helene%') OR (`custom_7` LIKE '%helene%'))  ORDER BY score DESC LIMIT 0, 999 ]
    202.11 |          | 				Tag error: <txp:article limit="999" searchall="0" /> -> Textpattern Error: Can't find FULLTEXT index matching the column list while parsing form <strong>None</strong> on page <strong>default</strong>
    202.13 |          | 		</txp:if_variable>
    202.14 |          | 	</txp:if_search>
    202.14 |          | </txp:if_section>

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 2019-02-02 09:29:25

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: [SOLVED] Search results do not appear

Might that problem have coincided with the time you merged your two databases? If so, you may need to REPAIR your tables to rebuild the fulltext index. If that doesn’t work, see if you can look up what the index names are in sequel pro or phpmyadmin, then compare that with the table index settings for a new 4.7.2 installation.

Make a backup first for good measure!


TXP Builders – finely-crafted code, design and txp

Offline

#3 2019-02-02 09:47:15

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [SOLVED] Search results do not appear

It actually did start then, I think. I will check the index names in phpMyAdmin and report back.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2019-02-02 10:02:53

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [SOLVED] Search results do not appear

OK… I have no idea what to look for:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2019-02-02 11:03:28

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: [SOLVED] Search results do not appear

After making a backup (am I repeating myself), try first switching to the “operations” tab in phpmyadmin and click on “repair tables”. That might be all yo need.

To check the indexes, go back to the “structure” tab you took the screenshot from and at the bottom of that page where the second set of tabs is, you’ll see something like “indexes+” which reveals the indexes.

You’ll also see on the “structure” tab that there is an index button/icon next to each table (a grid with a flash across it).


TXP Builders – finely-crafted code, design and txp

Offline

#6 2019-02-02 11:41:17

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [SOLVED] Search results do not appear

jakob wrote #316417:

After making a backup (am I repeating myself), try first switching to the “operations” tab in phpmyadmin and click on “repair tables”. That might be all yo need.

I tried it but the repair table is under the “Structure tab.” No search results.

To check the indexes, go back to the “structure” tab you took the screenshot from and at the bottom of that page where the second set of tabs is, you’ll see something like “indexes+” which reveals the indexes.

The screenshot was from the textpattern table structure at the bottom of which I get these two errors

  1. The indexes custom_2 and custom_2_3 seem to be equal and one of them could possibly be removed.
  2. The indexes custom_2 and custom_2_2 seem to be equal and one of them could possibly be removed.

Interestingly (screenshot again) I see no custom_2_3 and custom_2_2.

You’ll also see on the “structure” tab that there is an index button/icon next to each table (a grid with a flash across it).

I can see the “index” link on every row.

Apologies for this but it seems to be out of my depth… even with step by step instructions I do not seem to be seeing what you describe.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 2019-02-02 11:53:03

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: [SOLVED] Search results do not appear

The indexes custom_2 and custom_2_3 seem to be equal and one of them could possibly be removed.
The indexes custom_2 and custom_2_2 seem to be equal and one of them could possibly be removed.

Those two may be duplicate indexes from the merge. Click on the “drop” buttons next to custom_2_2 and custom_2_3 in the indexes list so that all that remains is custom_2. Does your search now work correctly?

BTW: You have a number of extra fulltext indexes in there that aren’t part of the normal installation. I wonder if you perhaps added them at some point with wet_haystack.

even with step by step instructions I do not seem to be seeing what you describe.

That might be just down to different versions of phpmyadmin.


TXP Builders – finely-crafted code, design and txp

Offline

#8 2019-02-02 16:27:32

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [SOLVED] Search results do not appear

It might indeed be different phpMyAdmin versions as for the life of me I can not find any “indexes+” anywhere.

I did drop the two extra customs but alas no results yet.

I guess that the indexded rows of the textpattern table are the ones below. Indeed I did use wet_haystack some time ago.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#9 2019-02-02 16:35:52

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: [SOLVED] Search results do not appear

Yiannis, check searchable_article_fields in your txp_prefs table. It should be Title, Body, but I’m sure it’s not the case for you.

You can also reinstall wet_haystack and set it to Title, Body to remove eventual leftover indexes.

Offline

#10 2019-02-02 16:49:27

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [SOLVED] Search results do not appear

etc wrote #316428:

Yiannis, check searchable_article_fields in your txp_prefs table. It should be Title, Body, but I’m sure it’s not the case for you.

You can also reinstall wet_haystack and set it to Title, Body to remove eventual leftover indexes.

And that did it!!! My remaining hair is saved!!! All I need to do now is limit te number of results/page! Thanks so much guys.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB