Class IndexSpec (5.0.3)
Stay organized with collections
Save and categorize content based on your preferences.
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
|
Overrides
getName()
| Returns |
| Type |
Description |
String |
the name of the index
|
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
toString()
| Returns |
| Type |
Description |
String |
|
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-03 UTC.
[null,null,["Last updated 2026-06-03 UTC."],[],[]]