Opened 13 years ago

Closed 13 years ago

#569 closed defect (fixed)

Using Stop words can construct illegal phrases

Reported by: jesseeichar Owned by: heikki
Priority: major Milestone: v2.6.5
Component: General Version: v2.6.3
Keywords: Cc:

Description

Suppose you make the phrase query:

the biggest

if you are using english stop words then 'the' is removed and the new phrase is ' biggest' (notice the space before biggest). Since spaces are removed when a metadata is indexed the phrase cannot find a match.

The solution I came up with is to do a check when constructing phrases to ensure that a term being added to the phrase has content, if not it will be discarded.

Attachments (1)

569_stop_words_ruin_phrase.diff (823 bytes ) - added by jesseeichar 13 years ago.
A patch that solves this issue. When applying you will have to use patch -p1 < 569_stop_words_ruin_phrase.diff most likely since it a git diff. Also the line number might be different. It is essentially one line so should be easy to manually apply

Download all attachments as: .zip

Change History (3)

by jesseeichar, 13 years ago

A patch that solves this issue. When applying you will have to use patch -p1 < 569_stop_words_ruin_phrase.diff most likely since it a git diff. Also the line number might be different. It is essentially one line so should be easy to manually apply

comment:1 by heikki, 13 years ago

Owner: changed from geonetwork-devel@… to heikki

Applied to 2.6.x rev. 8297, and trunk rev. 8298.

comment:2 by heikki, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.