"_source" is being sent as false. when .where(f -> f.matchAll()).fetchAll(); gets executed

Hello,

I have two questions. Kindly answer

Question 1)
When the following line gets executed
SearchResult activeEventResultSet = searchSession.search(DbActiveLearns.class)
.where(f -> f.matchAll()).fetchAll();

The request is sent is
2020-11-24 09:30:17.335 TRACE 6216 — [port thread - 2] o.h.search.elasticsearch.request : HSEARCH400093: Executed Elasticsearch HTTP POST request to path ‘/learnings-read/_search’ with query parameters {size=10000, track_total_hits=true} and 1 objects in payload in 27ms. Response had status 200 ‘OK’. Request body: <
{
“query”: {
“match_all”: POST
},
“_source”: false
}

Where _source is set to false. Due to which the response does not have any sources in hits.

. Response body: <
{
“took”: 20,
“timed_out”: false,
“_shards”: {
“total”: 1,
“successful”: 1,
“skipped”: 0,
“failed”: 0
},
“hits”: {
“total”: {
“value”: 1,
“relation”: “eq”
},
“max_score”: 1.0,
“hits”: [
{
“_index”: “learnings”,
“_type”: “_doc”,
“_id”: “XxZB0nUBmfRN3DNwXCtc”,
“_score”: 1.0
}
]
}
}

How to make send request without setting _source to false.

Question 2)
If I have inserted documents ti index through kibana using this
POST /learnings/_doc
{

}

then _id is set to some random string “Nim9HHYB9AI0nENFUPob” and i am seeing a Number format exception when the following line is executed.

SearchResult activeEventResultSet = searchSession.search(DbActiveLearns.class)
.where(f -> f.matchAll()).fetchAll();

Response: 200 ‘OK’ with body
{
“took”: 0,
“timed_out”: false,
“_shards”: {
“total”: 1,
“successful”: 1,
“skipped”: 0,
“failed”: 0
},
“hits”: {
“total”: {
“value”: 1,
“relation”: “eq”
},
“max_score”: 1.0,
“hits”: [
{
“_index”: “learnings”,
“_type”: “_doc”,
“_id”: “Nim9HHYB9AI0nENFUPob”,
“_score”: 1.0
}
]
}
}
] with root cause

java.lang.NumberFormatException: For input string: “Nim9HHYB9AI0nENFUPob”
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:na]
at java.base/java.lang.Long.parseLong(Long.java:692) ~[na:na]
at java.base/java.lang.Long.parseLong(Long.java:817) ~[na:na]
at org.hibernate.search.mapper.pojo.bridge.builtin.impl.DefaultLongIdentifierBridge.fromDocumentIdentifier(DefaultLongIdentifierBridge.java:23) ~[hibernate-search-mapper-pojo-base-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.mapper.pojo.bridge.builtin.impl.DefaultLongIdentifierBridge.fromDocumentIdentifier(DefaultLongIdentifierBridge.java:13) ~[hibernate-search-mapper-pojo-base-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.mapper.pojo.bridge.runtime.impl.PropertyIdentifierMapping.fromDocumentIdentifier(PropertyIdentifierMapping.java:70) ~[hibernate-search-mapper-pojo-base-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.mapper.orm.session.impl.HibernateOrmSearchSession.fromDocumentReference(HibernateOrmSearchSession.java:226) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.mapper.orm.session.impl.HibernateOrmSearchSession.fromDocumentReference(HibernateOrmSearchSession.java:58) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.engine.search.loading.spi.DefaultProjectionHitMapper.planLoading(DefaultProjectionHitMapper.java:36) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.backend.elasticsearch.search.projection.impl.ElasticsearchEntityProjection.extract(ElasticsearchEntityProjection.java:34) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.backend.elasticsearch.search.query.impl.Elasticsearch7SearchResultExtractor.extractHits(Elasticsearch7SearchResultExtractor.java:104) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.backend.elasticsearch.search.query.impl.Elasticsearch7SearchResultExtractor.extract(Elasticsearch7SearchResultExtractor.java:71) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.backend.elasticsearch.search.query.impl.Elasticsearch7SearchResultExtractor.extract(Elasticsearch7SearchResultExtractor.java:28) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.backend.elasticsearch.work.impl.SearchWork.generateResult(SearchWork.java:51) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.backend.elasticsearch.work.impl.AbstractNonBulkableWork.handleResult(AbstractNonBulkableWork.java:82) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.hibernate.search.backend.elasticsearch.work.impl.AbstractNonBulkableWork.lambda$execute$3(AbstractNonBulkableWork.java:67) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[na:na]
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[na:na]
at org.hibernate.search.backend.elasticsearch.client.impl.ElasticsearchClientImpl$1.onSuccess(ElasticsearchClientImpl.java:114) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
at org.elasticsearch.client.RestClient$FailureTrackingResponseListener.onSuccess(RestClient.java:590) ~[elasticsearch-rest-client-7.6.2.jar:7.6.2]
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:333) ~[elasticsearch-rest-client-7.6.2.jar:7.6.2]
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:327) ~[elasticsearch-rest-client-7.6.2.jar:7.6.2]
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:122) ~[httpcore-4.4.13.jar:4.4.13]
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:181) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:448) ~[httpcore-nio-4.4.13.jar:4.4.13]
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:338) ~[httpcore-nio-4.4.13.jar:4.4.13]
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265) ~[httpcore-nio-4.4.13.jar:4.4.13]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114) ~[httpcore-nio-4.4.13.jar:4.4.13]
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162) ~[httpcore-nio-4.4.13.jar:4.4.13]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337) ~[httpcore-nio-4.4.13.jar:4.4.13]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) ~[httpcore-nio-4.4.13.jar:4.4.13]
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276) ~[httpcore-nio-4.4.13.jar:4.4.13]
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) ~[httpcore-nio-4.4.13.jar:4.4.13]
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591) ~[httpcore-nio-4.4.13.jar:4.4.13]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

Instead if the document is inserted with the following command, we are getting a different response.

POST /learnings/_doc/1

then _id is set as
“_index” : “fm_active_events”,
“_type” : “_doc”,
"_id" : “1”,
“_score” : 1.0,

And we get a different error when the following line is executed
SearchResult activeEventResultSet = searchSession.search(DbActiveLearns.class)
.where(f -> f.matchAll()).fetchAll();

The annotations on the Entity class are as follows.
@Entity
//@Document(indexName=“fm.active_events”)
@Indexed (index=“learnings”)
@Table(name = “learnings”)
@Component

The tablename is in small letters but the query passed is having the table name as “LEARNINGS”

What naming strategy needs to be used for this.

Error is:

2020-12-03 12:48:08.758 TRACE 43740 — [port thread - 2] o.h.search.elasticsearch.request : HSEARCH400093: Executed Elasticsearch HTTP POST request to path ‘/learnings-read/_search’ with query parameters {size=10000, track_total_hits=true} and 1 objects in payload in 6ms. Response had status 200 ‘OK’. Request body: <
{
“query”: {
“match_all”: POST
},
“_source”: false
}

. Response body: <
{
“took”: 2,
“timed_out”: false,
“_shards”: {
“total”: 1,
“successful”: 1,
“skipped”: 0,
“failed”: 0
},
“hits”: {
“total”: {
“value”: 1,
“relation”: “eq”
},
“max_score”: 1.0,
“hits”: [
{
“_index”: “learnings”,
“_type”: “_doc”,
“_id”: “1”,
“_score”: 1.0
}
]
}
}

2020-12-03 12:48:17.937 DEBUG 43740 — [nio-9090-exec-2] org.hibernate.SQL :
select
dbbasedcor0_.sequence_id as sequence1_0_,
dbbasedcor0_.ack as ack2_0_,
dbbasedcor0_.ack_timestamp as ack_time3_0_,
dbbasedcor0_.acked_by as acked_by4_0_,
dbbasedcor0_.additional_info as addition5_0_,
dbbasedcor0_.cancelled_by as cancelle6_0_,
dbbasedcor0_.cancelled_timestamp as cancelle7_0_,
dbbasedcor0_.count as count8_0_,
dbbasedcor0_.learn_id as learn_i9_0_,
dbbasedcor0_.learn_name as learn_10_0_,
dbbasedcor0_.learn_type as learn_11_0_,
dbbasedcor0_.member_class as member_c12_0_,
dbbasedcor0_.member_group as member_g13_0_,
dbbasedcor0_.member_id as member_i14_0_,
dbbasedcor0_.member_key as member_k15_0_,
dbbasedcor0_.member_name as member_n16_0_,
dbbasedcor0_.member_source_ip as member_s17_0_,
dbbasedcor0_.member_time as member_t18_0_,
dbbasedcor0_.first_occurrence as first_o19_0_,
dbbasedcor0_.learn_entries as learn20_0_,
dbbasedcor0_.last_occurrence as last_oc21_0_,
dbbasedcor0_.owner as owner22_0_,
dbbasedcor0_.primary_ip as primary23_0_,
dbbasedcor0_.protocol as protoco24_0_,
dbbasedcor0_.severity as severit25_0_,
dbbasedcor0_.spec as spec26_0_,
dbbasedcor0_.summary as summary27_0_,
dbbasedcor0_.time_to_cancel as time_to28_0_,
dbbasedcor0_.type as type29_0_,
dbbasedcor0_.course_list as course30_0_,
dbbasedcor0_.version as version31_0_
from
learnings dbbasedcor0_
where
dbbasedcor0_.sequence_id in (
?
)
Hibernate:
select
dbbasedcor0_.sequence_id as sequence1_0_,
dbbasedcor0_.ack as ack2_0_,
dbbasedcor0_.ack_timestamp as ack_time3_0_,
dbbasedcor0_.acked_by as acked_by4_0_,
dbbasedcor0_.additional_info as addition5_0_,
dbbasedcor0_.cancelled_by as cancelle6_0_,
dbbasedcor0_.cancelled_timestamp as cancelle7_0_,
dbbasedcor0_.count as count8_0_,
dbbasedcor0_.learn_id as learn_i9_0_,
dbbasedcor0_.learn_name as learn_10_0_,
dbbasedcor0_.learn_type as learn_11_0_,
dbbasedcor0_.member_class as member_c12_0_,
dbbasedcor0_.member_group as member_g13_0_,
dbbasedcor0_.member_id as member_i14_0_,
dbbasedcor0_.member_key as member_k15_0_,
dbbasedcor0_.member_name as member_n16_0_,
dbbasedcor0_.member_source_ip as member_s17_0_,
dbbasedcor0_.member_time as member_t18_0_,
dbbasedcor0_.first_occurrence as first_o19_0_,
dbbasedcor0_.learn_entries as learn20_0_,
dbbasedcor0_.last_occurrence as last_oc21_0_,
dbbasedcor0_.owner as owner22_0_,
dbbasedcor0_.primary_ip as primary23_0_,
dbbasedcor0_.protocol as protoco24_0_,
dbbasedcor0_.severity as severit25_0_,
dbbasedcor0_.spec as spec26_0_,
dbbasedcor0_.summary as summary27_0_,
dbbasedcor0_.time_to_cancel as time_to28_0_,
dbbasedcor0_.type as type29_0_,
dbbasedcor0_.course_list as course30_0_,
dbbasedcor0_.version as version31_0_
from
learnings dbbasedcor0_
where
dbbasedcor0_.sequence_id in (
?
)
2020-12-03 12:48:17.951 WARN 43740 — [nio-9090-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 42102, SQLState: 42S02
2020-12-03 12:48:17.952 ERROR 43740 — [nio-9090-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : Table “learnings” not found; SQL statement:
select dbbasedcor0_.sequence_id as sequence1_0_, dbbasedcor0_.ack as ack2_0_, dbbasedcor0_.ack_timestamp as ack_time3_0_, dbbasedcor0_.acked_by as acked_by4_0_, dbbasedcor0_.additional_info as addition5_0_, dbbasedcor0_.cancelled_by as cancelle6_0_, dbbasedcor0_.cancelled_timestamp as cancelle7_0_, dbbasedcor0_.count as count8_0_, dbbasedcor0_.learn_id as learn_i9_0_, dbbasedcor0_.learn_name as learn_10_0_, dbbasedcor0_.learn_type as learn_11_0_, dbbasedcor0_.member_class as member_c12_0_, dbbasedcor0_.member_group as member_g13_0_, dbbasedcor0_.member_id as member_i14_0_, dbbasedcor0_.member_key as member_k15_0_, dbbasedcor0_.member_name as member_n16_0_, dbbasedcor0_.member_source_ip as member_s17_0_, dbbasedcor0_.member_time as member_t18_0_, dbbasedcor0_.first_occurrence as first_o19_0_, dbbasedcor0_.learn_entries as learn20_0_, dbbasedcor0_.last_occurrence as last_oc21_0_, dbbasedcor0_.owner as owner22_0_, dbbasedcor0_.primary_ip as primary23_0_, dbbasedcor0_.protocol as protoco24_0_, dbbasedcor0_.severity as severit25_0_, dbbasedcor0_.spec as spec26_0_, dbbasedcor0_.summary as summary27_0_, dbbasedcor0_.time_to_cancel as time_to28_0_, dbbasedcor0_.type as type29_0_, dbbasedcor0_.course_list as course30_0_, dbbasedcor0_.version as version31_0_ from learnings dbbasedcor0_ where dbbasedcor0_.sequence_id in (?) [42102-200]
2020-12-03 12:48:22.763 ERROR 43740 — [nio-9090-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not prepare statement; SQL [select dbbasedcor0_.sequence_id as sequence1_0_, dbbasedcor0_.ack as ack2_0_, dbbasedcor0_.ack_timestamp as ack_time3_0_, dbbasedcor0_.acked_by as acked_by4_0_, dbbasedcor0_.additional_info as addition5_0_, dbbasedcor0_.cancelled_by as cancelle6_0_, dbbasedcor0_.cancelled_timestamp as cancelle7_0_, dbbasedcor0_.count as count8_0_, dbbasedcor0_.learn_id as learn_i9_0_, dbbasedcor0_.learn_name as learn_10_0_, dbbasedcor0_.learn_type as learn_11_0_, dbbasedcor0_.member_class as member_c12_0_, dbbasedcor0_.member_group as member_g13_0_, dbbasedcor0_.member_id as member_i14_0_, dbbasedcor0_.member_key as member_k15_0_, dbbasedcor0_.member_name as member_n16_0_, dbbasedcor0_.member_source_ip as member_s17_0_, dbbasedcor0_.member_time as member_t18_0_, dbbasedcor0_.first_occurrence as first_o19_0_, dbbasedcor0_.learn_entries as learn20_0_, dbbasedcor0_.last_occurrence as last_oc21_0_, dbbasedcor0_.owner as owner22_0_, dbbasedcor0_.primary_ip as primary23_0_, dbbasedcor0_.protocol as protoco24_0_, dbbasedcor0_.severity as severit25_0_, dbbasedcor0_.spec as spec26_0_, dbbasedcor0_.summary as summary27_0_, dbbasedcor0_.time_to_cancel as time_to28_0_, dbbasedcor0_.type as type29_0_, dbbasedcor0_.course_list as course30_0_, dbbasedcor0_.version as version31_0_ from learnings dbbasedcor0_ where dbbasedcor0_.sequence_id in (?)]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement] with root cause

org.h2.jdbc.JdbcSQLSyntaxErrorException: Table “learnings” not found; SQL statement:
select dbbasedcor0_.sequence_id as sequence1_0_, dbbasedcor0_.ack as ack2_0_, dbbasedcor0_.ack_timestamp as ack_time3_0_, dbbasedcor0_.acked_by as acked_by4_0_, dbbasedcor0_.additional_info as addition5_0_, dbbasedcor0_.cancelled_by as cancelle6_0_, dbbasedcor0_.cancelled_timestamp as cancelle7_0_, dbbasedcor0_.count as count8_0_, dbbasedcor0_.learn_id as learn_i9_0_, dbbasedcor0_.learn_name as learn_10_0_, dbbasedcor0_.learn_type as learn_11_0_, dbbasedcor0_.member_class as member_c12_0_, dbbasedcor0_.member_group as member_g13_0_, dbbasedcor0_.member_id as member_i14_0_, dbbasedcor0_.member_key as member_k15_0_, dbbasedcor0_.member_name as member_n16_0_, dbbasedcor0_.member_source_ip as member_s17_0_, dbbasedcor0_.member_time as member_t18_0_, dbbasedcor0_.first_occurrence as first_o19_0_, dbbasedcor0_.learn_entries as learn20_0_, dbbasedcor0_.last_occurrence as last_oc21_0_, dbbasedcor0_.owner as owner22_0_, dbbasedcor0_.primary_ip as primary23_0_, dbbasedcor0_.protocol as protoco24_0_, dbbasedcor0_.severity as severit25_0_, dbbasedcor0_.spec as spec26_0_, dbbasedcor0_.summary as summary27_0_, dbbasedcor0_.time_to_cancel as time_to28_0_, dbbasedcor0_.type as type29_0_, dbbasedcor0_.course_list as course30_0_, dbbasedcor0_.version as version31_0_ from learnings dbbasedcor0_ where dbbasedcor0_.sequence_id in (?) [42102-200]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:453) ~[h2-1.4.200.jar:1.4.200]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:429) ~[h2-1.4.200.jar:1.4.200]
at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.200.jar:1.4.200]
at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.readTableOrView(Parser.java:7628) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.readTableFilter(Parser.java:1970) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.parseSelectFromPart(Parser.java:2827) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.parseSelect(Parser.java:2959) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.parseQuerySub(Parser.java:2817) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.parseSelectUnion(Parser.java:2649) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.parseQuery(Parser.java:2620) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.parsePrepared(Parser.java:868) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.parse(Parser.java:843) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.parse(Parser.java:815) ~[h2-1.4.200.jar:1.4.200]
at org.h2.command.Parser.prepareCommand(Parser.java:738) ~[h2-1.4.200.jar:1.4.200]
at org.h2.engine.Session.prepareLocal(Session.java:657) ~[h2-1.4.200.jar:1.4.200]
at org.h2.engine.Session.prepareCommand(Session.java:595) ~[h2-1.4.200.jar:1.4.200]
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235) ~[h2-1.4.200.jar:1.4.200]
at org.h2.jdbc.JdbcPreparedStatement.(JdbcPreparedStatement.java:76) ~[h2-1.4.200.jar:1.4.200]
at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:352) ~[h2-1.4.200.jar:1.4.200]
at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:337) ~[HikariCP-3.4.5.jar:na]
at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java) ~[HikariCP-3.4.5.jar:na]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:149) ~[hibernate-core-5.4.17.Final.jar:5.4.17.Final]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:176) ~[hibernate-core-5.4.17.Final.jar:5.4.17.Final]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:151) ~[hibernate-core-5.4.17.Final.jar:5.4.17.Final]
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:2085) ~[hibernate-core-5.4.17.Final.jar:5.4.17.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2022) ~[hibernate-core-5.4.17.Final.jar:5.4.17.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2000) ~[hibernate-core-5.4.17.Final.jar:5.4.17.Final]
at org.hibernate.loader.Loader.doQuery(Loader.java:951) ~[hibernate-core-5.4.17.Final.jar:5.4.17.Final]

Thanks & Regards,
Srikanth C

Use a projection to retrieve a particular field. In particular, the source projection will return a JSON object containing the full source. But if you’re only after one or two fields, I’d suggest the field projection instead.

Alternatively, you can manipulate the JSON of the request and response directly.

If you intend to populate documents yourself, you must provide data consistent with your Hibernate Search mapping. In your DbActiveLearns class, the identifier is a Long. So you must provide the identifier when you create a document, and it must be parsable to a Long.

I hope you were only doing this for debugging, because Hibernate Search is fully able to populate your index for you. You’re not supposed to do it by hand.

I’m not sure what you’re referring to. The table name is in lowercase in the query:
[...] from learnings dbbasedcor0_ where [...[]. See below. And that’s exactly what you configured: @Table(name = “learnings”).

Are you sure the table “learnings” exists in the database? Because your database doesn’t seem to agree, judging from the error message “Table “learnings” not found”.