Exact phrase searching in 3.0.x

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
wilsonlogan
Registered User
Posts: 29
Joined: Wed Nov 25, 2015 9:48 am

Exact phrase searching in 3.0.x

Post by wilsonlogan »

Hi All,

Am I being obtuse or is there really no exact phrase search functionality in 3.0.x?

Thanks,

Wilson.
User avatar
Lumpy Burgertushie
Registered User
Posts: 68294
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Exact phrase searching in 3.0.x

Post by Lumpy Burgertushie »

I don't believe that is possible with the default search engine that phpbb uses.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
AmigoJack
Registered User
Posts: 5795
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Exact phrase searching in 3.0.x

Post by AmigoJack »

Phrase searching ("exact phrase" versus exact phrase) is possible on both 3.1 and 3.0. And in 3.0 it is possible with both "Fulltext mysql" and "Fulltext native".

However, both branches have at least one bug in handling phrases (i.e. PHPBB3-13958).
  • The worst thing about censorship is ███████████
  • "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
wilsonlogan
Registered User
Posts: 29
Joined: Wed Nov 25, 2015 9:48 am

Re: Exact phrase searching in 3.0.x

Post by wilsonlogan »

My experience is that if you search for

"Dunkin Donuts"

you will indeed be returned results that contain "Dunkin Donuts" but also results like

"My friend Dunkin likes Donuts"

which to me is not an exact phrase search. Unless I'm missing something and you can do something like

"Dunkin Donuts" -"Dunkin" -"Donuts"
wilsonlogan
Registered User
Posts: 29
Joined: Wed Nov 25, 2015 9:48 am

Re: Exact phrase searching in 3.0.x

Post by wilsonlogan »

Which wouldn't work either now that I think about it.
User avatar
AmigoJack
Registered User
Posts: 5795
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Exact phrase searching in 3.0.x

Post by AmigoJack »

wilsonlogan wrote:My experience is that if you search for
"Dunkin Donuts"
you will indeed be returned results that contain
"Dunkin Donuts"
"My friend Dunkin likes Donuts"
Then you've experienced no phrase searches, but merely keyword searches that strip quotes from your input. A keyword search will naturally also find results where keywords appear in the same order without anything inbetween.

Either they accept phrases, or they don't - there is no "exact phrase search".
  • The worst thing about censorship is ███████████
  • "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
davidbutler
Registered User
Posts: 5
Joined: Thu Aug 25, 2016 3:42 am

Re: Exact phrase searching in 3.0.x

Post by davidbutler »

Thread starter Wilson Logan is helping me stand up a professional/technical forum. He started this thread on my behalf. I need to settle on which software we're going to use, and exact phrase search is a non-negotiable requirement.

I originally planned to use VBulletin, which I recall has an "exact phrase search" checkbox on the advanced search page. I recently learned that feature wasn't implemented in version 5, and for reasons I can't begin to fathom, it was ripped out of version 4, which is still in wide use.

Wilson recommended phpBB, until this...
wilsonlogan wrote:..results... contain "Dunkin Donuts" but also results like

"My friend Dunkin likes Donuts"

which to me is not an exact phrase search. Unless I'm missing something...
Wilson, actually, what I think you're seeing is exact phrase search with a twist. Based on my testing (ver.3.0.14), when quotes are used, the search results ONLY include posts that include the exact phrase. However, all instances of the words contained within the quotes are highlighted. In your example, a comment with "My friend Dunkin likes Donuts" must have also contained the exact phrase "Dunkin Dounuts." I can see how that would be confusing.

I would consider that an annoyance bug but it doesn't break exact phrase search capability.
User avatar
AmigoJack
Registered User
Posts: 5795
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Exact phrase searching in 3.0.x

Post by AmigoJack »

davidbutler wrote:Thread starter
phpBB doesn't have threads, only topics.
davidbutler wrote:exact phrase search
Such a thing does not exist: if you're searching for a phrase it's already something exact. The terms you and wilsonlogan are using are redundant like "IRC chat" or "ATM machine".
davidbutler wrote:(ver.3.0.14), when quotes are used, the search results ONLY include posts that include the exact phrase.
No, not the exact phrase - the phrase. Period. What would be a non-exact phrase anyway?
davidbutler wrote:However, all instances of the words contained within the quotes are highlighted. In your example, a comment with "My friend Dunkin likes Donuts" must have also contained the exact phrase "Dunkin Dounuts." I can see how that would be confusing.
Leaving apart that phpBB does not know comments either (those are posts) let me help distinguishing this: search results display only those posts (or topics) which have the phrase you searched for. The highlighting in those displayed posts however is flawed - this is a technical limitation. You can test this if you just search with your internet browser thru the following search results and you'll always find at least one occurance of what you searched for - unbound to what is highlighted. Examples:
  1. Phrase "Dunkin Donuts" only
  2. Phrase "exact phrase search" only
  3. Phrase "exact phrase search" plus keyword Donuts only
  • The worst thing about censorship is ███████████
  • "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
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22919
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: Exact phrase searching in 3.0.x

Post by Mick »

davidbutler wrote:exact phrase search is a non-negotiable requirement
Can you explain why and what it is you're trying to achieve, there may be another way.
"The more connected we get the more alone we become" - Kyle Broflovski©
davidbutler
Registered User
Posts: 5
Joined: Thu Aug 25, 2016 3:42 am

Re: Exact phrase searching in 3.0.x

Post by davidbutler »

Sorry for the delay in responding but I didn't receive a notification email. This time I made sure I have the Notify box checked...

@Jack, thanks for correcting my terminology. I agree 'exact phrase' is redundant.

I'm interested in the bug you noted in your first post in this topic, whereby phrase searches that include logical operators are incorrectly interpreted as such. I saw the fix you posted last year on the bug tracker page for fulltext_mysql. Did this pass the test of time in your implementation? Since we will likely be using v3.0.14, we would like to incorporate that code into our code if that's OK.
davidbutler
Registered User
Posts: 5
Joined: Thu Aug 25, 2016 3:42 am

Re: Exact phrase searching in 3.0.x

Post by davidbutler »

Mick wrote:Can you explain why and what it is you're trying to achieve, there may be another way.
I 'own' a technical-professional group on LinkedIn, which I'm moving to a stand-alone forum platform. Over the last couple of years, LinkedIn has dumbed down the Groups platform to the point that's it no longer serves its purpose for groups like mine.

The groups search engine has always sucked eggs, but a couple of years ago, they stopped indexing individual posts under a topic (searches now only work on top posts). Then late last year LinkedIn stopped sending notification emails when comments are posted to topics being followed. They have over 2 million groups so I guess the email burden was getting out of hand. That was the final straw. Activity in my group fell off a cliff after that.

My group is mid-sized, with ~11,000 members. The archives represent a treasure trove of technical knowledge with lots of in-depth discussions contributed to by top industry leaders and practitioners. In making this move, the overriding objective has been to preserve the archive, which goes back more than seven years, and make it more accessible.

To that end, we found a way to capture a large portion of the archive. Our database has (or will soon have) over 1,600 topics and 25,000 individual posts. Wilson is importing those into phpBB, which unlike LinkedIn groups, allows topics to be organized into sub-forums, etc.

To make the archives more accessible, it is imperative that the forum software support phrase searches. What other way did you have in mind?
User avatar
AmigoJack
Registered User
Posts: 5795
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Exact phrase searching in 3.0.x

Post by AmigoJack »

davidbutler wrote:Did this pass the test of time in your implementation?
We're using said code for 15 months and it's working as intended. I've learnt that tickets remain in status "unresolved" almost always because so far nobody wrote a fix thru git (and code thru comments doesn't count as such).
  • The worst thing about censorship is ███████████
  • "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
User avatar
Lumpy Burgertushie
Registered User
Posts: 68294
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Exact phrase searching in 3.0.x

Post by Lumpy Burgertushie »

my understanding of "exact phrase" searching is thus;

if you go to google and type in "big blue widgets" with the quotes.

then your returns will only show pages that have that exact phrase. it will not show pages that have the words big or blue or widgets on them. it will not return pages that have big blue or blue widgets or big widgets etc.

( it may show those lower in the listing but not at the top ).

so, in google, when you put quotes around your search phrase, it is supposed to only return pages that have that exact phrase on them.
If you do not put the quotes around your phrase, then it will return pages with any or all of the words in your phrase but not only the "exact phrase".

in the phpbb search, you can not do the same thing. if you type in a phrase with or without quotes, the phpbb search will return posts with that phrase but also it will return every post that has any of the individual words or any combination of the words in that phrase.

hence, the term "exact phrase" is appropriate even if it seems redundant.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
davidbutler
Registered User
Posts: 5
Joined: Thu Aug 25, 2016 3:42 am

Re: Exact phrase searching in 3.0.x

Post by davidbutler »

Lumpy Burgertushie wrote:if you type in a phrase with or without quotes, the phpbb search will return posts with that phrase but also it will return every post that has any of the individual words or any combination of the words in that phrase.
That's simply not true.

Go to the Advanced Search page, make sure the option box "Search for all terms or use query as entered" is checked, and add quotes. See Jack's example "B" above. Here's another, taken from your post...

"it will return every post that has any of the individual words"
http://bit.ly/2de6xaM

Try that without the quotes.
User avatar
Lumpy Burgertushie
Registered User
Posts: 68294
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Exact phrase searching in 3.0.x

Post by Lumpy Burgertushie »

I get your point however, notice that the hilited words are not all there.

it is not hiliting the phrase, it did not actually search the exact phrase. it searched for each word in the phrase and brought you back the post with all of those words
to have been a true exact phrase search return it should have been like this:
... searching is thus; if you go to google and type in "big blue widgets" with the quotes. then your returns will only ... "exact phrase". in the phpbb search, you can not do the same thing. if ...
with the exact line you put between the quotes highlited and no other words highlited.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Locked

Return to “[3.0.x] Support Forum”