You are here: Foswiki>Tasks Web>Item12951 (05 Jul 2015, GeorgeClark)Edit Attach

Item12951: Stopwords are treated as regex in search which can cause confusion

pencil
Priority: Normal
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Component: SEARCH
Branches: trunk
Reported By: ChristianKoehn
Waiting For:
Last Change By: GeorgeClark
Hi,

The default set of Stopwords in the search contains "i.e.". The Parser.pm treats this stopword as a regexp which matches all four letter words starting with "i" and third character "e". So, for instance a search for "IEEE" is leading to 0 results.

Either it should be documented that stopwords are regular expressions (and then change "i.e." to "i\.e\.") or the stopwords should not be treated this way.

Thank you and best regards, Christian

-- ChristianKoehn - 30 Jun 2014

Thanks for catching this. It will be fixed in Foswiki 1.2. The search code will auto quote any meta characters passed in the stopwords. Note that if you've worked around this by changing the stopword to i\.e\., after 1.2, the escapes will need to be removed, or the stopword will literally be i\.e\.

-- GeorgeClark - 01 Jul 2014
 

ItemTemplate edit

Summary Stopwords are treated as regex in search which can cause confusion
ReportedBy ChristianKoehn
Codebase 1.1.9, 1.1.8, trunk
SVN Range
AppliesTo Engine
Component SEARCH
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:fcaa3b6ac581
TargetRelease major
ReleasedIn 2.0.0
CheckinsOnBranches trunk
trunkCheckins distro:fcaa3b6ac581
Release01x01Checkins
Topic revision: r4 - 05 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy