Skip to content

Commit

Permalink
HSEARCH-2434 Add a missing implementation of MetadataProvidingFieldBr…
Browse files Browse the repository at this point in the history
…idge in tests
  • Loading branch information
yrodiere committed Mar 21, 2017
1 parent 62dcd10 commit ce6cf10
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,13 @@ public WrappedStringValue(String value) {
}
}

public static class WrappedStringValueFieldBridge implements org.hibernate.search.bridge.FieldBridge, StringBridge {
public static class WrappedStringValueFieldBridge implements MetadataProvidingFieldBridge, StringBridge {

@Override
public void configureFieldMetadata(String name, FieldMetadataBuilder builder) {
builder.field( name, FieldType.STRING )
.sortable( true );
}

@Override
public String objectToString(Object object) {
Expand All @@ -831,6 +837,7 @@ public void set(String name, Object value, Document document, LuceneOptions luce
}

luceneOptions.addFieldToDocument( name, stringValue, document );
luceneOptions.addSortedDocValuesFieldToDocument( name, stringValue, document );
}

}
Expand Down

0 comments on commit ce6cf10

Please sign in to comment.