# How do I use FieldBridge in hibernate-search 6?

**URL:** <https://discourse.hibernate.org/t/how-do-i-use-fieldbridge-in-hibernate-search-6/6090>\
**Category:** Hibernate Search\
**Created:** [February 28, 2022, 11:53am UTC](https://discourse.hibernate.org/t/how-do-i-use-fieldbridge-in-hibernate-search-6/6090 "2022-02-28T11:53:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prashant\_Kamble](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@Prashant\_Kamble](https://discourse.hibernate.org/u/Prashant_Kamble)\
**Post date:** [February 28, 2022, 11:53am UTC](https://discourse.hibernate.org/t/how-do-i-use-fieldbridge-in-hibernate-search-6/6090/1 "2022-02-28T11:53:50Z")

</div>

I am new for the hibernate search and wanted to know how we can convert below implementations in hibernate search 6 ?? Which type of bridge is more suitable in this case??  
**[//ResourceAttributesBridge.java](https://ResourceAttributesBridge.java)**

```auto
@Override
public void set(final String name, final Object value, final Document document, final LuceneOptions luceneOptions) {

.....
.....

luceneOptions.addFieldToDocument(fieldName, item, document);
....    
    
}

```

/Resource.java

```auto
public class Resource {

 .......
 .......

@MapKeyColumn(name = "attribute_name")
@Column(name = "attribute_value", nullable = false, length = 5000)
@Field(bridge = @FieldBridge(impl = ResourceAttributesBridge.class))

@Convert(attributeName = "value", converter = JSONObjectConverter.class)
@EqualsAndHashCode.Exclude
@ToString.Exclude
@OptimisticLock(excluded = true)
private Map<String, JSONObject> attributes;

......
.......
}

```

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [February 28, 2022, 2:30pm UTC](https://discourse.hibernate.org/t/how-do-i-use-fieldbridge-in-hibernate-search-6/6090/2 "2022-02-28T14:30:44Z")

</div>

Closing as duplicate of stackoverflow question: [Unable to find below classes in hibernate-search 6 - Stack Overflow](https://stackoverflow.com/q/71235164/6692043)

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [February 28, 2022, 2:30pm UTC](https://discourse.hibernate.org/t/how-do-i-use-fieldbridge-in-hibernate-search-6/6090/3 "2022-02-28T14:30:48Z")

</div>

Closed on February 28, 2022, 2:30pm UTC


