Search in sources :

Example 1 with ContextSuggestField

use of org.apache.lucene.search.suggest.document.ContextSuggestField in project elasticsearch by elastic.

the class CategoryContextMappingTests method assertContextSuggestFields.

static void assertContextSuggestFields(IndexableField[] fields, int expected) {
    int actualFieldCount = 0;
    for (IndexableField field : fields) {
        if (field instanceof ContextSuggestField) {
            actualFieldCount++;
        }
    }
    assertThat(actualFieldCount, equalTo(expected));
}
Also used : IndexableField(org.apache.lucene.index.IndexableField) ContextSuggestField(org.apache.lucene.search.suggest.document.ContextSuggestField)

Aggregations

IndexableField (org.apache.lucene.index.IndexableField)1 ContextSuggestField (org.apache.lucene.search.suggest.document.ContextSuggestField)1