Mik created Bug HSEARCH-1253
Issue Type: Bug Bug
Affects Versions: 4.2.0.Beta2
Assignee: Unassigned
Components: mapping
Created: 03/Jan/13 3:31 AM
Description:

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)

Environment: Hibernate core 4.1.6 , search 4.2.0. Beta2, MySQL5.1
Project: Hibernate Search
Labels: search tikabridge
Priority: Major Major
Reporter: Mik
Original Estimate: 2h
Remaining Estimate: 2h
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira