News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Finding the words used in searches

Started by davo88, January 15, 2024, 05:15:13 PM

Previous topic - Next topic

davo88

Is it possible to find the actual words that people have been searching for in a 2.0.19 forum?
Looking through the database, I see a table 'log_search_words' but the field ID_WORD contains numbers.
I can't figure out if the actual words are stored anywhere.

Arantor

The actual terms people are using to search are not logged anywhere, and extracting it from the URL (if it gets shown there) is difficult because the URL in that situation also includes all of the boards included in the search.
Holder of controversial views, all of which my own.


davo88

I was thinking of more of words entered into the SMF search engine, rather than words used in external ones like Google.
So broadly speaking, do you know what all the search related tables are storing?

smf_log_search_messages
smf_log_search_results
smf_log_search_subjects
smf_log_search_topics
smf_log_search_words

Are they storing keywords from posted messages so the search engine can find stuff quickly?  

Arantor

Long story short, yes.

The posts are broken down into words, and then the words are mapped into a sort of index that outlines 'word id 1 is "the"' and then '"the" appears in posts 1, 3 and 6'

The results table is primarily used as a temporary store of what results were found for a given search just to be able to pull the messages easily to show the results but it doesn't track what was searched for, merely the outcome.

I'm not sure I understand what you're trying to achieve beyond poking at how the system works... what's the end goal of this?
Holder of controversial views, all of which my own.


davo88

Thanks for the explanation Arantor.

My forum has become quite large over the last 20 years with lots of technical information in the topics. But there are now so many topics, and the forum user demographic tends to be older and less computer skilled people. A few of them might try a search, but I suspect the majority don't know where to begin, glaze over and wander off.

So I am completely rebuilding the forum, upgrading to 2.1.4 as a first step, and then considering using TinyPortal's blocks and articles system to provide help, insights and pathways to the content of interest in the forum topics.

If I knew what words they used when searching, I might be able to figure out better solutions, teach them how to improve their searches and provide some predefined searches and templates for common themes.

Arantor

Which brings me right back to the original statement: SMF doesn't log what people search for (at all) and the only place it is ever exposed is in a format that's essentially unusable for doing exactly what you're trying to do.
Holder of controversial views, all of which my own.


davo88


Doug Heffernan

Quote from: davo88 on January 15, 2024, 05:15:13 PMIs it possible to find the actual words that people have been searching for in a 2.0.19 forum?

This will require a custom mod. It won't display the search words used in the past, but it can log and store the search words used by members from the time of the mod installation. As it happens I have coded such a mod for someone year last year.

davo88

Doug, is the mod compatible with 2.1.4 and is it offered on a free or paid basis?

Doug Heffernan

Quote from: davo88 on January 16, 2024, 11:34:48 AMDoug, is the mod compatible with 2.1.4 and is it offered on a free or paid basis?

Yes, it was made for Smf 2.1.x branch and it was done as a paid custom job for a member here.

davo88

Doug, are you able to post or PM some more information eg
  • how the mod works
  • what it records
  • output - perhaps a sample
  • does it modify any SMF source code
  • indication of cost

Doug Heffernan

The mod adds a table to the database where it stores all search words used by members, the search time and members ip addresses from the time of the installation and onwards. Then the results are displayed in the admin panel.

It has 0 file edits. It was coded entirely out of hooks. I don't have the mod anymore to post a preview. Regarding the costs, that is best discussed in private.

Doug Heffernan

Quote from: davo88 on January 16, 2024, 12:53:29 PMDoug, are you able to post or PM some more information eg
  • how the mod works
  • what it records
  • output - perhaps a sample
  • does it modify any SMF source code
  • indication of cost


You can see all that info here:

https://www.simplemachines.org/community/index.php?topic=588081

Steve

Since the OP has been here today with no further input on this issue, marking solved.
My pet rock is not feeling well. I think it's stoned.

Advertisement: