lib/messages/search_request.js
function SearchRequest(options) {
  options = options || {};
  assert.object(options);

  options.protocolOp = Protocol.LDAP_REQ_SEARCH;
  LDAPMessage.call(this, options);

  if (options.baseObject !== undefined) {
    this.baseObject = options.baseObject;
  } else {
    this.baseObject = dn.parse('');
  }
  this.scope = options.scope || 'base';
  this.derefAliases = options.derefAliases || Protocol.NEVER_DEREF_ALIASES;
  this.sizeLimit = options.sizeLimit || 0;
  this.timeLimit = options.timeLimit || 0;
  this.typesOnly = options.typesOnly || false;
  this.filter = options.filter || null;
  this.attributes = options.attributes ? options.attributes.slice(0) : [];
}
function SearchRequest(options) {
  options = options || {};
  assert.object(options);

  options.protocolOp = Protocol.LDAP_REQ_SEARCH;
  LDAPMessage.call(this, options);

  if (options.baseObject !== undefined) {
    this.baseObject = options.baseObject;
  } else {
    this.baseObject = dn.parse('');
  }
  this.scope = options.scope || 'base';
  this.derefAliases = options.derefAliases || Protocol.NEVER_DEREF_ALIASES;
  this.sizeLimit = options.sizeLimit || 0;
  this.timeLimit = options.timeLimit || 0;
  this.typesOnly = options.typesOnly || false;
  this.filter = options.filter || null;
  this.attributes = options.attributes ? options.attributes.slice(0) : [];
}
/--- API