SQL for Forum Users

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
AmigoJack
Registered User
Posts: 6106
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: SQL for Forum Users

Post by AmigoJack »

That reminds me of my ticket "search phrase interprets operator words" where nobody was able to distinguish between a search phrase and search keywords. After 4+ years it was finally fixed.

Example: querying the phrase "Search here not working" versus the keywords Search here not working.
  1. The former behaves correctly, as the whole phrase must occur in that order with no other words in there. And words like not or or or and have no special meaning.
  2. The latter behaves correctly, too, since not is an operator (and would be otherwise a stopword, because it occurs too often anyway), meaning the following keyword (working) must not occur.
And boy did many people not even know that the search was expected to support this (and did so with 3.0 until 3.1 broke it), although they belonged to the support/delevoper team. Maybe it's new to readers of this topic, too. Or that operators exist.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
ChrisGreaves
Registered User
Posts: 17
Joined: Mon Jan 03, 2022 2:54 pm
Location: painful.inspiration.inhabited
Name: Chris Greaves
Contact:

Re: SQL for Forum Users

Post by ChrisGreaves »

AmigoJack wrote: Sun Jan 16, 2022 9:47 am That reminds me of my ticket "search phrase interprets operator words" where nobody was able to distinguish between a search phrase and search keywords.
Hello AmigoJack, and my apologies if your post was NOT (grin!) replying to my post suggesting a decent logical search facility, as in "{remove | reduce } AND { Click | Hiss | Noise | Pop | Notch}".
The issue of special words for operators, or reserved words in an expression is usually handled by symbols, as I did in my example, using the <vertical bar> for the inclusive-OR operator, and <wiggly braces> for embracing lexical atoms of the search.

I suspect that most people in this Topic are programmers with years of experience in different languages, so determining the syntax of the expressions will not be a problem.

Greatly related to the topic, I suspect, too, that it will be those with advanced education in logical expressions who would take advantage of a better interface.
I suspect that a great many people use the Advanced Search in a simple sense, then pore over the 183 results by hand, and that is good and it works for them and saves them time. Just like someone driving to the store using only first gear because but is much faster than walking, and changing gears is complicated.

But then someone like me, who is interested in setting up a search URL that will serve thousands of members of a board for dozens of years would use the ability to design a complex logical expression, knowing that the time spent by one person setting it up is repaid in time by the time saved by thousands of users.
And that means benefits for people using phpBB software, and that ought to be good for phpBB.

Cheers, Chris
User avatar
wmorg
Registered User
Posts: 54
Joined: Thu Dec 31, 2020 5:47 am
Location: Madrid, Spain

Re: SQL for Forum Users

Post by wmorg »

 
Thank you AmigoJack. That is a contribution and a help from your greater experience and knowledge of the phpBB system.

Thank you also ChrisGreaves. Interesting the way of the URLs in order to try to get as much juice out of it as possible.

Please, let me say a personal overview:

From my point of view, there are several ways to run, to name a few: the power of the search (this is definable), fields to search on, type of results (eg: counts too), etc, etc.

Obviously, in a first approximation to a search engine, the essential operator is AND. Which, by the way, in the code I put, the search for literal phrases and also single words was contemplated regardless of the order of appearance.

I, on my forum, don't use the phpBB search engine, I use SQL, and personally (just personal experience) I'm much more satisfied. The biggest problem comes when I am faced with other phpBB forums, for many years, in which I am just another user.

In those cases where I'm just a user, there's a lot of information that I can't access, and a lot more that I can't process due to lack of "power", etc. Many times I get better results searching in Google with "site:…", than with the phpBB search engine.

Let us take into account that the users, their frequencies, their moments, etc. (an information line), the contents (another; post_text and post_subject), the timestamps of so many things (another), (what, who, when) and there may be more; they make up a cloud of information ("big data"), on which to search for a lot of cross information that obviously, at the moment, escapes the phpBB search engine.

Greetings
 
User avatar
wmorg
Registered User
Posts: 54
Joined: Thu Dec 31, 2020 5:47 am
Location: Madrid, Spain

Re: SQL for Forum Users

Post by wmorg »

 
Another thought:

The users of the forums create a cloud of information among all of us, but that does not mean that we are delivering it exclusively to the owner of the forum.

It would be fair play and socio-scientifically enriching, to offer the cloud to users as well.

As usual: thought to debug and refine for possible application.
 
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5850
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: SQL for Forum Users

Post by thecoalman »

wmorg wrote: Sun Jan 16, 2022 1:06 pm Many times I get better results searching in Google with "site:…", than with the phpBB search engine. 
You have to remember that phpBB's search is a "dumb" search, that's not to say it can't be improved but any improvements aren't going to make it smart. On the flipsisde it can be better if you are narrowly defining the search, e.g keyword from specific user.

The one thing I have done to improve the search is edit the default search so it lists results the first post only which is typically the most relevant for a search. The repetitive replies that can fill up a search result are generally not as helpful.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
wmorg
Registered User
Posts: 54
Joined: Thu Dec 31, 2020 5:47 am
Location: Madrid, Spain

Re: SQL for Forum Users

Post by wmorg »

thecoalman wrote: Sun Jan 16, 2022 10:32 pm
wmorg wrote: Sun Jan 16, 2022 1:06 pm Many times I get better results searching in Google with "site:…", than with the phpBB search engine. 
You have to remember that phpBB's search is a "dumb" search, that's not to say it can't be improved but any improvements aren't going to make it smart. On the flipsisde it can be better if you are narrowly defining the search, e.g keyword from specific user.

The one thing I have done to improve the search is edit the default search so it lists results the first post only which is typically the most relevant for a search. The repetitive replies that can fill up a search result are generally not as helpful.

Let's keep one thing in mind:

That little intelligence to put the most relevant results in the first positions can have the opposite effect.

Many times, in the choice of the words that we search for, there is already the intelligence that is needed for the search that we want to launch. If we add another interpretation to that, supposedly intelligent, easily the operation that we do clearly, really, adds noise and worsens the result.

If the intended intelligence is already in the choice of words, it is appropriate to make a perfectly dumb search about it, nothing more. The relevance is already contemplated. It's very easy to ignore lots of more records or pages.

It's just a possibility, which personally occurs to me a lot: the relevancy algorithm, alien to me, worsens the results I'm looking for.

There are lots of other possibilities. That is why flexibility at the service of the user will give generalized power.
 
Post Reply

Return to “phpBB Custom Coding”