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.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
wilsonlogan
Registered User
Posts: 24
Joined: Wed Nov 25, 2015 9:48 am

Exact phrase searching in 3.0.x

Post by wilsonlogan » Tue May 03, 2016 10:40 pm

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: 66324
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Exact phrase searching in 3.0.x

Post by Lumpy Burgertushie » Tue May 03, 2016 11:53 pm

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.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
AmigoJack
Registered User
Posts: 5588
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Exact phrase searching in 3.0.x

Post by AmigoJack » Wed May 04, 2016 8:47 am

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 ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
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.

wilsonlogan
Registered User
Posts: 24
Joined: Wed Nov 25, 2015 9:48 am

Re: Exact phrase searching in 3.0.x

Post by wilsonlogan » Tue May 10, 2016 8:41 am

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: 24
Joined: Wed Nov 25, 2015 9:48 am

Re: Exact phrase searching in 3.0.x

Post by wilsonlogan » Tue May 10, 2016 8:41 am

Which wouldn't work either now that I think about it.

User avatar
AmigoJack
Registered User
Posts: 5588
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Exact phrase searching in 3.0.x

Post by AmigoJack » Tue May 10, 2016 12:32 pm

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 ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
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.

davidbutler
Registered User
Posts: 5
Joined: Thu Aug 25, 2016 3:42 am

Re: Exact phrase searching in 3.0.x

Post by davidbutler » Sun Sep 11, 2016 8:43 am

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: 5588
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Exact phrase searching in 3.0.x

Post by AmigoJack » Sun Sep 11, 2016 9:47 pm

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 ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
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.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21129
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Exact phrase searching in 3.0.x

Post by Mick » Sun Sep 11, 2016 10:40 pm

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 » Thu Sep 22, 2016 8:37 am

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 » Thu Sep 22, 2016 9:13 am

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: 5588
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Exact phrase searching in 3.0.x

Post by AmigoJack » Thu Sep 22, 2016 9:50 am

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 ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
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.

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

Re: Exact phrase searching in 3.0.x

Post by Lumpy Burgertushie » Thu Sep 22, 2016 3:59 pm

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.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

davidbutler
Registered User
Posts: 5
Joined: Thu Aug 25, 2016 3:42 am

Re: Exact phrase searching in 3.0.x

Post by davidbutler » Thu Sep 22, 2016 6:15 pm

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: 66324
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Exact phrase searching in 3.0.x

Post by Lumpy Burgertushie » Thu Sep 22, 2016 6:30 pm

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.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Locked

Return to “[3.0.x] Support Forum”