Issue 128379 - SearchSimilarity does'nt work with a sentence containing spaces
Summary: SearchSimilarity does'nt work with a sentence containing spaces
Status: CLOSED DUPLICATE of issue 59734
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 4.1.7
Hardware: All Windows 10
: P5 (lowest) Normal
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-18 14:45 UTC by Jean-Michel COSTE
Modified: 2020-05-31 10:23 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
File contain texte and macro (29.19 KB, application/vnd.oasis.opendocument.text)
2020-05-20 23:13 UTC, Jean-Michel COSTE
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Jean-Michel COSTE 2020-05-18 14:45:49 UTC
In Writer module a macro using Findfirst with .SearchSimilarity = trus does'nt work if the search string is a sentence containing spaces.
Example : .SearchString = "Lorem ipsum" not fount.

oSearch = oDoc.createSearchDescriptor()

with oSearch
   .SearchString = "Lorem ipsum"
   .SearchRegularExpression =false
   .SearchCaseSensitive = false
   .SearchSimilarity = true
   .SearchWords = false
   .SearchSimilarityAdd = 2
   .SearchSimilarityRemove =2
end withoSearch = oDoc.createSearchDescriptor()

Return Not Found
Comment 1 oooforum (fr) 2020-05-20 20:04:32 UTC
Save our time, please provide a sample document including this macro.
Comment 2 Jean-Michel COSTE 2020-05-20 23:13:32 UTC
Created attachment 86950 [details]
File contain  texte and macro

The macro don't work if SearchSimilarity is true. Work if false.
Work on words, but not on sentence.
Comment 3 oooforum (fr) 2020-05-22 16:29:59 UTC
For me, not a bug.
Did you read this page:
https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Editing_Text_Documents
Sample for similarity search shows that this works for one word and finding its plural and declinations.
Comment 4 Jean-Michel COSTE 2020-05-30 14:47:20 UTC
It also doesn't work in the interface.
Comment 5 Jean-Michel COSTE 2020-05-30 17:14:39 UTC
Real bug. Same described here : https://bz.apache.org/ooo/show_bug.cgi?id=59734
Comment 6 Peter 2020-05-30 17:23:13 UTC
Quote:
When it was designed, the main purpose for similarity search was to find
variants of lengish words, and not parts of sentences (several words). 

Note a bug. You use the funtionality out of scope. However, we could think on extending the functionality. Which is an enhancement. I close this bug, as Duplicate and we can continue on the old one.

*** This issue has been marked as a duplicate of issue 59734 ***
Comment 7 Peter 2020-05-30 17:31:32 UTC
thx for your effort in the research, Jean-Michel COSTE.
I hope we do not sound unfriendly. We appreciate dedication.