Class: Couchbase::Management::SearchIndex

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/management/search_index_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|self| ... } ⇒ SearchIndex

Returns a new instance of SearchIndex.

Yield Parameters:



402
403
404
405
406
# File 'lib/couchbase/management/search_index_manager.rb', line 402

def initialize
  @type = "fulltext-index"
  @source_type = "couchbase"
  yield self if block_given?
end

Instance Attribute Details

#nameString



375
376
377
# File 'lib/couchbase/management/search_index_manager.rb', line 375

def name
  @name
end

#paramsHash



384
385
386
# File 'lib/couchbase/management/search_index_manager.rb', line 384

def params
  @params
end

#plan_paramsHash



399
400
401
# File 'lib/couchbase/management/search_index_manager.rb', line 399

def plan_params
  @plan_params
end

#source_nameString



387
388
389
# File 'lib/couchbase/management/search_index_manager.rb', line 387

def source_name
  @source_name
end

#source_paramsHash



396
397
398
# File 'lib/couchbase/management/search_index_manager.rb', line 396

def source_params
  @source_params
end

#source_typeString



390
391
392
# File 'lib/couchbase/management/search_index_manager.rb', line 390

def source_type
  @source_type
end

#source_uuidString



393
394
395
# File 'lib/couchbase/management/search_index_manager.rb', line 393

def source_uuid
  @source_uuid
end

#typeString



378
379
380
# File 'lib/couchbase/management/search_index_manager.rb', line 378

def type
  @type
end

#uuidString



381
382
383
# File 'lib/couchbase/management/search_index_manager.rb', line 381

def uuid
  @uuid
end

Instance Method Details

#to_backendObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/couchbase/management/search_index_manager.rb', line 409

def to_backend
  {
    name: name,
    type: type,
    uuid: uuid,
    params: (JSON.generate(params) if params),
    source_name: source_name,
    source_type: source_type,
    source_uuid: source_uuid,
    source_params: (JSON.generate(source_params) if source_params),
    plan_params: (JSON.generate(plan_params) if plan_params),
  }
end