/** * @param fieldName field name * @return RewriteMethod for a given field */ @Override public RewriteMethod getMultiTermRewriteMethod(String fieldName) { SchemaField field = schema.getFieldOrNull(fieldName); if (field == null) { return getMultiTermRewriteMethod(); } FieldType type = field.getType(); return type.getRewriteMethod(nonTextParser, field); }
/** * Currently returns multiTermRewriteMethod no matter the field. * This allows for hooks for overriding to handle * field-specific MultiTermRewriteMethod handling * * @param field field to use * @return RewriteMethod for a given field */ protected RewriteMethod getMultiTermRewriteMethod(String field) { return multiTermRewriteMethod; }
/** * * @return default multitermrewritemethod */ protected RewriteMethod getMultiTermRewriteMethod() { return multiTermRewriteMethod;}
/** * This currently sets the method for all fields. * @param method rewrite method */ public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) { this.multiTermRewriteMethod = method; }