Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-11-01 10:06:10

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 489

Search results do not appear

Hello,
I have problems with the article search in the article list tab:
I already read and tried everything here Search results do not appear

but without any improvement.

I can describe my problem in more detail:
If I check e.g. only “categories” in the search options it will search and find correctly within categories.
As well in ID, section etc.
But when searching in all of them checked it will find nothing … even the individually searched/found categories will now have no results.
Search in “title, Body, Excerpt” doesn’t work at all.

Any hint or idea?

Last edited by saccade (2019-11-01 10:07:12)

Offline

#2 2019-11-01 18:39:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,776
Website

Re: Search results do not appear

Di you check that your db is OK? It might need some repairs.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#3 2019-11-01 18:51:45

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 489

Re: Search results do not appear

Hi Yiannis,
I did check that. Everything is fine in the database.
Even the indices are as they should be.
also I checked the searchable-parameter.
Anyway I “repaired” the tables twice.

Edit save one thing: the “Cardinality” of the “searching”-index is the same as Posted or PRIMARY, it is 7980, it’s not 1 as in your example in the other trhread – should it be?.

Last edited by saccade (2019-11-01 18:55:28)

Offline

#4 2019-11-01 19:14:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,776
Website

Re: Search results do not appear

I remember I had the problem (different cause) with the front end search and etc advised me to re-install wet_haystack. I’m by no means certain but it might work for you.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#5 2019-11-01 21:05:04

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,764
Website

Re: Search results do not appear

I too would have though it has to do with the indexes and that they may need wiping/recreating.

Does putting the site in debug mode and looking at the tag trace (should work for the admin side too) provide any clues?


TXP Builders – finely-crafted code, design and txp

Offline

#6 2019-11-01 21:38:04

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 489

Re: Search results do not appear

I had wet_haystack installed long ago, and now re-installed, configured and de-installed again without any effect (but isn’t it for the front-end search?).

I had debug mode already in effect, but there were a lot of non-related warnings, I couldn’t find any clue in between.

Is there a direct way to wipe and recreate in MySQL?

I think, I’ll try wet_haystack once again.

Offline

#7 2020-02-27 09:22:13

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 489

Re: Search results do not appear

OK, still not solved.

Meanwhile I upgraded to txp 4.8.0 – everything except admin side search is fine.
Dear developers: Thank you very much for all your good thoughts, skills, effort, work to let txp flourish!

I checked every possible combination of wet_haystack on/off/configuration,
I directly deleted and recreated an index in the database …

nothing changed the odd behaviour:

As long as I search from admin side article tab for ID, categories … whatever without title/body/excerpt the search results are fine.
But if I search only title/body/excerpt or title/body/excerpt together with any other – the result will be: “no results”. nothing, not a single article.
Even trying different kinds of search phrase doesn’t change anything.

I’v checked it with “debug”-Mode: Even not a single notice! Very clean tab!

At least the only thought I have now in mind: I have over 10400 articles now.
But it ceased searching articles even before they were 9900.

I’m really perplexed.

Offline

#8 2020-02-27 10:10:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,131
Website

Re: Search results do not appear

This is baffling indeed. Just to recap:

  • Your searchable_article_fields pref is set to “Title,Body,Excerpt”.
  • Your textpattern table is fully repaired (check in rss_admin_db_manager or your MySQL client interface of choice).

Correct?

If so, create a new hidden article and populate it with the following Body content, replacing your-db-name-here where appropriate:

==<txp:php>
$type = safe_rows(
    'TABLE_NAME, ENGINE',
    'information_schema.TABLES',
    'TABLE_SCHEMA = "your-db-name-here" AND TABLE_NAME = "textpattern"'
);
$indexes = safe_rows(
    'TABLE_NAME, INDEX_NAME, COLUMN_NAME, COLLATION, CARDINALITY, SEQ_IN_INDEX',
    'information_schema.STATISTICS',
    'TABLE_SCHEMA = "your-db-name-here" AND TABLE_NAME = "textpattern"'
);
dmp($type, $indexes);
</txp:php>==

View the article and check the results it splurges out. You should first see the database engine type (which is likely to be InnoDB) and then a whole raft of indexes. Check each one looks kinda okay.

The cardinality is just an estimate of the number of unique values in the index, so you’d expect the values in the title, body and excerpt indices to be higher. The collation will likely be ‘A’ (ascending) or ‘D’ (descending) or NULL for those tables where an order makes no sense.

The main indexes you’re looking for are the ones with COLUMN_NAME = Title, Body and/or Excerpt. There should be at least two, both with INDEX_NAME = searching and INDEX_TYPE = FULLTEXT. You may also have ones with INDEX_NAME = wet_haystack, depending if the plugin is installed and/or has left them behind when uninstalled. If you’ve uninstalled the plugin you can remove these indexes.

If any of the ‘searching’ indices are missing or don’t look quite right, you should drop the odd-looking ones and recreate them like this:

CREATE FULLTEXT searching ON textpattern (Title, Body);

See if any of that helps.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2020-02-27 10:14:23

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 489

Re: Search results do not appear

Hi Bloke! Nice to see you here :)

Yes, correct.

I’ll now do as recommended …

Offline

#10 2020-02-27 10:16:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,131
Website

Re: Search results do not appear

saccade wrote #321958:

Hi Bloke! Nice to see you here :)

Part of the furniture… :)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB