Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to build a knowledge Base Retrieval system with Elasticsearch

Shulou Source: shulou.com Published: 2022-06-01 15:42:09 09月26日 Update

This article is about how to use Elasticsearch to build a knowledge base retrieval system, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

1. How are documents of pdf and Office indexed by ES?

More specifically, how pdf, Office class documents (word,ppt,excel, etc.) are imported into ES. As shown in the figure: the question turns to: how to import Office documents and PDF documents into ES for indexing and provide full-text retrieval services?

2. What is the maximum length of fields to be retrieved by Elasticsearch?

After the ES5.X version, keyword supports a maximum length of 32766 UTF-8 characters, and text has no limit on character length. When ignore_above is set, data beyond the given length will not be indexed and cannot be retrieved through term exact matching.

Reference: http://t.cn/RYlEMgn

Refer to 6. 0 official website to interpret: http://t.cn/RYlELoV

Reference luncene7.1API: http://t.cn/RYWvuGl

3. Office&pdf documents are stored in Elastisearch attention list.

Cut the crap and go straight to the picture.

4. Analyze the actual combat code

From a functional and performance point of view, the recommendations for the establishment of a knowledge base are as follows: 1) the core of the knowledge base is to import data into ES, and the core of importing ES is the parsing of various types of documents; 2) set Mapping in advance and define the strategy of field word segmentation and non-word segmentation; 3) for the storage of a field greater than 1MB, it is recommended to use fvh highlight mode, which is set together in Mapping.

The above is how to use Elasticsearch to build a knowledge base retrieval system, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Knowledge document retrieval knowledge base length field index reference system maximum character suggestion data more core article question support practical accurate Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Huawei OPPO Reno vpn MySQL