Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Search on a field that contain special characters #2062

Unanswered
alexcagliari87 asked this question in General
Discussion options

  • Laravel-mongodb Version: 3.6
  • PHP Version: 7.2
  • MongoDB 4.2

Description:

It's impossible to search in a field that contains special characters like / or + or -.
I have a document like this:

{ 
 "_id" : ObjectId("5f04580972af7f797e3cbcfc"), 
 "operationsDone" : NumberInt(599), 
 "inserted_at" : ISODate("2020-07-07T11:10:01.031+0000"), 
 "updated_at" : ISODate("2020-07-07T11:10:01.031+0000"), 
 "owner" : "5tz99qECeaLScwaAwYmvJ7c3TRugdimp0xf/12aKrmaWnbwhfUHoYWnSgMxaTQ0YeAl2ZLLKW4r3XNVJIb7Xs12tSCO2R66VsuXJ1N6j+XQYssVEht4vL2EEEsNpx/1u"
}

Steps to reproduce

  1. Insert this document
  2. $response = self::where('owner','5tz99qECeaLScwaAwYmvJ7c3TRugdimp0xf/12aKrmaWnbwhfUHoYWnSgMxaTQ0YeAl2ZLLKW4r3XNVJIb7Xs12tSCO2R66VsuXJ1N6j+XQYssVEht4vL2EEEsNpx/1u');
  3. We can't find any results

Expected behaviour

We have to find one result

Actual behaviour

No results found

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #2062 on September 04, 2020 20:14.

AltStyle によって変換されたページ (->オリジナル) /