[SERVER-10345] regex search result difference copy/paste and manual type Created: 26/Jul/13  Updated: 10/Dec/14  Resolved: 05/Aug/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.4.5
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: telman shahbazov Assignee: Andre de Frere
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

telman@telman:~/Apps$ uname -a
Linux telman 3.8.0-26-generic #38-Ubuntu SMP Mon Jun 17 21:43:33 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


Operating System: Linux
Steps To Reproduce:

telman@telman:~$ uname -a
Linux telman 3.8.0-26-generic #38-Ubuntu SMP Mon Jun 17 21:43:33 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

telman@telman:~$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=tr_TR.UTF-8
LC_TIME=tr_TR.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=tr_TR.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=tr_TR.UTF-8
LC_NAME=tr_TR.UTF-8
LC_ADDRESS=tr_TR.UTF-8
LC_TELEPHONE=tr_TR.UTF-8
LC_MEASUREMENT=tr_TR.UTF-8
LC_IDENTIFICATION=tr_TR.UTF-8
LC_ALL=

telman@telman:~$ mongo uysdb
MongoDB shell version: 2.4.5
connecting to: uysdb
>
db.dataBankCalculateFormulas.update(

{"name" : "A.А=A.I+A.II"}

,
{$set:{
"active" : true,
"converter" : "MoneyConverter",
"droolsMeasureKey" : "solo",
"droolsRuleCoordinate" :

{"xCode" : "A.А","yCode" : "solo"}

,
"droolsVertical" : [
"+",

{"valueKey":"solo", "xCode":"A.I", "yCode":"solo"}

,
"+",

{"valueKey":"solo", "xCode":"A.II", "yCode":"solo"}

],
"forms" : "calculateFormulas",
"relations" : "H1",
"style" : "background-color : #98FB98 ; text-align : right;",
"validPeriods" : [200306]
}},

{upsert:true}

);

db.dataBankCalculateFormulas.findOne(

{"name" : "A.А=A.I+A.II"}

)

{
"_id" : ObjectId("51f219b9cfd52b4d2be30f1c"),
"active" : true,
"converter" : "MoneyConverter",
"droolsMeasureKey" : "solo",
"droolsRuleCoordinate" :

{ "xCode" : "A.А", "yCode" : "solo" }

,
"droolsVertical" : [
"+",

{ "valueKey" : "solo", "xCode" : "A.I", "yCode" : "solo" }

,
"+",

{ "valueKey" : "solo", "xCode" : "A.II", "yCode" : "solo" }

],
"forms" : "calculateFormulas",
"name" : "A.А=A.I+A.II",
"relations" : "H1",
"style" : "background-color : #98FB98 ; text-align : right;",
"validPeriods" : [
200306
]
}

//type A.A= by using keybord
db.dataBankCalculateFormulas.findOne(

{"name" : /A.A=/}

)
null
//copy/paste A.A= from above findOne search result
db.dataBankCalculateFormulas.findOne(

{"name" : /A.A=/}

)
it is o now
{
"_id" : ObjectId("51f219b9cfd52b4d2be30f1c"),
"active" : true,
"converter" : "MoneyConverter",
"droolsMeasureKey" : "solo",
"droolsRuleCoordinate" :

{ "xCode" : "A.А", "yCode" : "solo" }

,
...
...

Participants:

 Description   

there is difference when you search with regex.
when I normally use using keyboard it give the null result.
when just copy/paste from previous success search result then it is ok.

Could you please advice ?

Regards,
Telman



 Comments   
Comment by Andre de Frere [ 05/Aug/13 ]

Resolving this ticket since it appears that the earlier reproduction steps where matching on two different character sets and therefore this is as Works As Designed

Comment by Andre de Frere [ 31/Jul/13 ]

Hi Telman,

Checking in with you as it has been a couple of days since we heard back. Has this resolved your issue?

Regards,
André

Comment by Andre de Frere [ 29/Jul/13 ]

Hi Telman,

It appears that you are searching on two different characters in your above steps to reproduce. In the original upsert you are inserting the "А" character which is U+0410 or Cyrillic Capital Letter A and not the standard capital A character. When you later search for this character you look for the standard capital A rather than the unicode character you have inserted.

The two characters may look the same, but are not.

If you intended to insert U+0410 then you will need to search for that character as well. If you did not intend to insert a unicode character into this formula, then you will need to update your collection so as to only include non-unicode characters.

Regards,
André

Generated at Thu Feb 08 03:22:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.