Skip to content

SEARCH returns any data which value start with the field value #12

@muniekK

Description

@muniekK

Hi,

This is my query: 'user':'wer'.

I expected it to return all the data with user named 'wer' only. But instead it return any data where the name started with 'wer' (e.g: werr, werww, wer*). I wish to know if its normal.

below are the code with sources that i found and write at nodejs server. Thank you.
`

 //https://github.com/archr/mongoose-datatables 
// https://github.com/archr/mongoose-datatables/blob/master/example/index.js
  Model.dataTables({
    limit: req.body.length,
    skip: req.body.start,
    order: req.body.order,
    columns: req.body.columns,
    search: {
      value: username,
      fields: ['user']
    },
    sort: {
      date:-1
    }
  }).then(function (table) {
    res.json({
      data:table.data,
      recordsFiltered: table.total,
      recordsTotal: table.total
    }); 
  })
})`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions