Support ⇒ Dragonfly CMS v10 ⇒ Search not returning all results ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDragonfly CMS v10

Search not returning all results Reply to topic

Go to page 1, 2 Next

Something weird is going on with my searching.
Definitely not all results are returned.

For instance, I search for something very generic (in the car world) like "radiator" and only one topic is returned.
I'm not doing any archiving or anything like that.

I can't see a search index database that could be regenerated. Where should I start to look?

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


It's very strange indeed. When i search on your website for "project" nothing is returned.
Yet i find a bunch at www.mustangtech.com.au.../f=20.html
When i search on this website, a lot are returned.

When i search on your website for "Jacko" more is returned, but the date is Sat Oct 29, 2016 and after (not before)

Can you check with the following query
SELECT * FROM {$PREFIX}_search_wordlist WHERE word_common = 1

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


That table doesn't exist!
When was that added?

Strange that I'm not seeing an error about it missing.

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


I have no {$PREFIX}_search tables at all.
Not sure how many there are meant to be.

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Oh, I have bbsearch_wordlist.

No results for SELECT * FROM {$PREFIX}_bbsearch_wordlist WHERE word_common = 1

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by hybrid on Mon Nov 28, 2016 1:31 am; edited 1 time in total


Some more info.
When I test search for wordlist in my files, there are two entries:

modules/Forums/install/cpg_inst.php contains:
$this->prefix.'search_wordlist'

modules/Forums/install/schema.xml contains:
<table name="bbsearch_wordlist" engine="MyISAM">


There seems to be references to both tables.

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


You can look in the bbsearch_wordlist table if "radiator" is in there, and in then look in the bbsearch_wordmatch table how many posts are returned for the word_id

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


There are only two entries in there, which is how many posts are returned by the search.
Is there some way to update or re-generate the wordlist/wordmatch tables?

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Not that i know of. But will look into it if something is possible.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


I'm pretty sure you can do it in phpBB, but I don't know how they do it.
Is there a way to test if it's working at all?

Where is the code that generates the list as posts are made?

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


./includes/dragonfly/forums/post.php:343:
\Dragonfly\Forums\Search::addWords($this->id, $this->message, $this->subject);

./includes/dragonfly/forums/search.php:83:
public static function addWords($post_id, $post_text, $post_title)


You could write a function to select all posts and then call addWords() for each record

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Sun Dec 04, 2016 1:59 pm; edited 1 time in total


We just got rid of the wordlist search technique used by dragonfly.
We have more than 50,000 posts and directly
searching the table was just as fast and returns all records.

Perhaps using a Indexed wordlist table technique was needed years back
But directly searching the post works just fine in todays mysql or mira DB's

Dragonfly 9.4 Running on PHP 7.x + MariaDB

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
PHP Version 7.0.6 + MariaDB + Dragonfly 9.4 Modified


Did you have the same problem bulldog?

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


DJ Maze wrote
./includes/dragonfly/forums/post.php:343:
\Dragonfly\Forums\Search::addWords($this->id, $this->message, $this->subject);

./includes/dragonfly/forums/search.php:83:
public static function addWords($post_id, $post_text, $post_title)


You could write a function to select all posts and then call addWords() for each record


I think I will have to as I don't have any other choice, except to change over to a direct search like bulldog has.
I don't like straying too far from the core code though, if I can avoid it.

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Will this work?

$result = $db->query("SELECT post_id, post_subject, post_text FROM {$db->TBL->bbposts_text}"); while ($row = $result->fetch_row()) { \Dragonfly\Forums\Search::addWords($row['post_id'], $row['post_text'], $row['post_subject']); }

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

All times are UTC
Go to page 1, 2 Next


Jump to: