use of com.yelp.nrtsearch.server.grpc.Field in project nrtsearch by Yelp.
the class AnalyzerCreatorTest method testHasAnalyzerAnalyzerPresent.
@Test
public void testHasAnalyzerAnalyzerPresent() {
Field field = Field.newBuilder().setAnalyzer(getPredefinedAnalyzer()).build();
assertTrue(hasAnalyzer(field));
}
use of com.yelp.nrtsearch.server.grpc.Field in project nrtsearch by Yelp.
the class FieldDefCreatorTest method testCustomFieldNotDefined.
@Test(expected = IllegalArgumentException.class)
public void testCustomFieldNotDefined() {
Field field = Field.newBuilder().setType(FieldType.CUSTOM).setAdditionalProperties(Struct.newBuilder().putFields("type", Value.newBuilder().setStringValue("custom_field_type").build()).build()).build();
FieldDefCreator.getInstance().createFieldDef("test_field", field);
}
Aggregations