Bug 22306 - Elasticsearch search not working - it returns no result found in catalog search
Summary: Elasticsearch search not working - it returns no result found in catalog search
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: 18.11
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-11 11:53 UTC by cfhong2000
Modified: 2020-01-06 20:14 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cfhong2000 2019-02-11 11:53:13 UTC
Here is my info:

Koha: 18.11.01
ElasticSearch Installed: 5.16.14

When I ran /usr/share/koha/bin/search_tools/rebuild_elastic_search.pl -v -d
and I got this from Elasticsearch log.

Is this a similar issue found on https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20073?

[2019-02-11T00:48:26,174][DEBUG][o.e.a.b.TransportShardBulkAction] [1rMdLEo] [koha_kohaInstance_biblios][4] failed to execute bulk item (index) BulkShardRequest [[koha_acccnlib_biblios][4]] containing [9] requests
org.elasticsearch.index.mapper.MapperParsingException: failed to parse
        at org.elasticsearch.index.mapper.DocumentParser.wrapInMapperParsingException(DocumentParser.java:176) ~[elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:69) ~[elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:277) ~[elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:530) ~[elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.index.shard.IndexShard.prepareIndexOnPrimary(IndexShard.java:507) ~[elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.bulk.TransportShardBulkAction.prepareIndexOperationOnPrimary(TransportShardBulkAction.java:458) ~[elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.bulk.TransportShardBulkAction.executeIndexRequestOnPrimary(TransportShardBulkAction.java:466) ~[elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:145) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:114) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:69) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryShardReference.perform(TransportReplicationAction.java:975) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryShardReference.perform(TransportReplicationAction.java:944) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.ReplicationOperation.execute(ReplicationOperation.java:113) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.onResponse(TransportReplicationAction.java:345) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.onResponse(TransportReplicationAction.java:270) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction$1.onResponse(TransportReplicationAction.java:924) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction$1.onResponse(TransportReplicationAction.java:921) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.index.shard.IndexShardOperationsLock.acquire(IndexShardOperationsLock.java:151) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.index.shard.IndexShard.acquirePrimaryOperationLock(IndexShard.java:1659) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction.acquirePrimaryShardReference(TransportReplicationAction.java:933) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction.access$500(TransportReplicationAction.java:92) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.doRun(TransportReplicationAction.java:291) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.14.jar:5.6.14]
        at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryOperationTransportHandler.messageReceived(TransportReplicationAction.java:266) [elasticsearch-5.6.14.jar:5.6.14]


Thanks,
C Hong
Comment 1 Martin Renvoize 2019-02-11 15:40:49 UTC
Reaching out to Ere as the Topic Expert this cycle.. Nothing stood out to me at a glance.
Comment 2 Ere Maijala 2019-03-01 08:50:54 UTC
Have you tried resetting the index mappings (Koha administration => Search engine configuration)?
Comment 3 cfhong2000 2019-04-21 19:00:39 UTC
(In reply to Ere Maijala from comment #2)
> Have you tried resetting the index mappings (Koha administration => Search
> engine configuration)?

Yes. And I upgraded elasticsearch to 5.6.16 and it seemed like the issue is gone. 

But I found a problem of searching the catalog. If I enter a barcode to be searched, it finds no result. If I search the catalog using a word, it can find results. 

My question is how to configure Elasticsearch that it can be searched by barcode? In Search engine configuration, I don't see barcode is parts of Search Fields.

Thanks.
Comment 4 cfhong2000 2019-04-22 03:15:18 UTC
I spent a few hours testing on searching barcode. I can search the catalog by barcode. However, it cannot find the barcode of the books that I entered recently. It returned no result found. This is a different issue.