Search for INexact string

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15587
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Search for INexact string

Post by ChrisGreaves »

2.png
I am still struggling with "search".
For the time being, leaving aside the issue of whether my laptop has a TrackPad or Mouse, I wanted to see what the world thought of an over-sensitive wossit, and I thought that a search for mouse+sensitiv should find any posts with various forms such as 'sensitive", "sensitivity", and even typos such as "sensitivityityity" etc.
3.png
When I smarten up and include a wild-card trailing asterisk in the search I see what I expect to see (circled in purple in the image immediately above).
But the first image returns me "81 matches", and as far as I can see not one of them contains the string "sensitiv" (without any trailing characters).
If NO posts in the Win10 forum contain the exact string "sensitiv", why did I get a non-zero number of matches for "sensitiv" AND "mouse"?

Ta ever so.
chris
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle

User avatar
HansV
Administrator
Posts: 78412
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Search for INexact string

Post by HansV »

You may prefer to use Google to search the Lounge. If you search for mouse sensitive site:eileenslounge.com, its algorithm will also return results for mouse sensitivity etc.
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15587
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Search for INexact string

Post by ChrisGreaves »

HansV wrote:
01 Sep 2020, 11:14
You may prefer to use Google to search the Lounge. If you search for mouse sensitive site:eileenslounge.com, its algorithm will also return results for mouse sensitivity etc.
Thanks Hans.
I think that this is tantamount to saying "Don't use the Lounge's search function", in a mild way.
Hence my question, sort of:-
Why did I get a non-zero number of matches for "sensitiv" AND "mouse"?

Shouldn't my search have returned NO results?
Thanks
Chris
There's nothing heavier than an empty water bottle

User avatar
HansV
Administrator
Posts: 78412
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Search for INexact string

Post by HansV »

I don't know how phpBB's search algorithm works, but my guess is that

a) If you don't specify wildcards, it only looks for whole word matches.
b) Since it finds no matches for "sensitiv", it looks at "mouse" only (unlike what you'd expect).
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15587
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Search for INexact string

Post by ChrisGreaves »

HansV wrote:
01 Sep 2020, 13:30
... it looks at "mouse" only (unlike what you'd expect).
Ah! Thanks Hans. Indeed the result did fail my expectations.
This aspect of "search" is contrary to most other implementations i have come across.
Cheers
Chris
(This business of growing older and thinking that you are losing your mind can drive you crazy!) :laugh: :laugh:
There's nothing heavier than an empty water bottle

PJ_in_FL
5StarLounger
Posts: 1098
Joined: 21 Jan 2011, 16:51
Location: Florida

Re: Search for INexact string

Post by PJ_in_FL »

It appears the first search was for matches for "sensitiv" OR "mouse".

Using advanced search options might be more likely to get the hits you expect, or, as Hans noted, use GOOGLE and trust their algorithm format.
PJ in (usually sunny) FL

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15587
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Search for INexact string

Post by ChrisGreaves »

PJ_in_FL wrote:
02 Sep 2020, 19:46
It appears the first search was for matches for "sensitiv" OR "mouse".
Hi PJ. My point exactly!
But the search mechanism is supposed to treat two separate strings as an AND conjunction by default.
That is, the following three forms should return identical results (zero matches):-

Code: Select all

sensitiv mouse
+sensitiv +mouse
sensitiv AND mouse
Cheers
Chris
There's nothing heavier than an empty water bottle

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15587
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Search for INexact string

Post by ChrisGreaves »

HansV wrote:
01 Sep 2020, 11:14
You may prefer to use Google to search the Lounge. If you search for mouse sensitive site:eileenslounge.com, its algorithm will also return results for mouse sensitivity etc.
HOORAY!
I can now search posted comments on my second-favorite site.

Code: Select all

possessive site:https://historyofenglishpodcast.com
The search box on historyofenglishpodcast.com seems to search only Kevin's text, not the users posted comments.
The nifty "site:" trick above searches users comments too.
(wanders off to try his luck elsewhere ...)
Thanks again
Chris
There's nothing heavier than an empty water bottle