Class IndexSpec (2.0.0)

public class IndexSpec

Represents information about an index. This class is used to fully specify the index you want to retrieve from the SearchService. To build an instance use the #newBuilder() method and set all required parameters, plus optional values different than the defaults.


   SearchService searchService = SearchServiceFactory.getSearchService();

   IndexSpec spec = IndexSpec.newBuilder()
       .setName("docs")
       .build();

   Index index = searchService.getIndex(spec);
 
 

Inheritance

Object > IndexSpec

Static Methods

newBuilder()

public static IndexSpec.Builder newBuilder()

Creates a new IndexSpec builder. You must use this method to obtain a new builder. The returned builder must be used to specify all properties of the IndexSpec. To obtain the IndexSpec call the Builder#build() method on the returned builder.

Returns
Type Description
IndexSpec.Builder

a builder which constructs a IndexSpec object

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getName()

public String getName()
Returns
Type Description
String

the name of the index

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides