I have an indexed entity with a field mapped like this :
@Column(name ="DOC_PATH")
@Field
@TikaBridge
private String docPath;
docPath references a pdf text file for the entity.
I have indexed the entities with a massindexer and am able to search fine through luke, the pdf are well indexed.
While trying to search through hibernate search, I encounter the following problem :
The code for the search is :
QueryBuilder DIInQB = ftSession.getSearchFactory().buildQueryBuilder().forEntity(IndexedEntityWithPdf.class ).get();
Query diInLuceneQuery = DIInQB.keyword().
onField("docPath").
matching(s.toLowerCase()).createQuery();
The code returns an exception which is thrown on the creation of the query, with the following cause :
Caused by: org.hibernate.search.SearchException: FieldBridge class org.hibernate.search.bridge.builtin.TikaBridge does not have a objectToString method: field docPath in com.viris.entity.indicateur_entities.IndexedEntityWithPdf
at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.objectToString(DocumentBuilderIndexedEntity.java:749)
at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.buildSearchTerm(ConnectedMultiFieldsTermQueryBuilder.java:146)
at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:100)
at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:81)
at com.viris.view.Search.SearchAppPage.search(SearchAppPage.java:132)
|