HSEARCH000338 : incomplete entity information in a document retrieved from the index

Hi Members,
I am getting this error while performing a search through hibernate query. This error is not coming each and every search keyword but for some of them.
Error what I am getting is :
org.hibernate.search.exception.SearchException: HSEARCH000338: Incomplete entity information in a document retrieved from the index: the entity type ('com.xxxxxxx.xxxxx.entity.ComxxxxSingleline') or identifier ('null') was missing.
I am unable to understand this error.

Let me know if anymore information is required from my side.

Hello.

  • Which version of Hibernate Search are you using?
  • What appears in the logs before this error, especially if you set the log category org.hibernate.search.elasticsearch.request to TRACE?
org.hibernate.search.exception.SearchException: HSEARCH000338: Incomplete entity information in a document retrieved from the index: the entity type ('com.xxxxx.xxxxxx.entity.CoxxxxxSingleline') or identifier ('null') was missing.
	at org.hibernate.search.query.engine.impl.EntityInfoImpl.getId(EntityInfoImpl.java:74)
	at org.hibernate.search.query.hibernate.impl.QueryLoader.executeLoad(QueryLoader.java:78)
	at org.hibernate.search.query.hibernate.impl.AbstractLoader.load(AbstractLoader.java:73)
	at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.doHibernateSearchList(FullTextQueryImpl.java:242)
	at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:225)
	at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:124)

Above lines logged before in the log file.

Version of Hibernate is : hibernate-search-engine-5.11.5.Final.jar

That’s not the logs, that’s the exception.

Regardless… There are three possibilities:

  1. You implemented a custom identifier bridge, and this bridge returned null when converting the document ID, for some reason. Solution: fix your bridge.
  2. Your index data is incomplete. This can happen if you use an Elasticsearch index, and you inserted documents manually through Elasticsearch’s REST API. Solution: fix your manual document insertion process (or, preferably, don’t do that at all).
  3. Your index data is out of date. This can happen if you renamed the identifier property in your entities. Solution: reindex all your data.
1 Like

Thanks ! @yrodiere
I have deleted the lucene indexes folder and done the rebuild of my indexes.
It worked then.