Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the experiences of using ElasticSearch?

Shulou Source: shulou.com Published: 2022-06-01 02:24:48 11月15日 Update

This article introduces what you have learned from the use of ElasticSearch, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

Version ES 1.7.1 pyes 0.99.6

ES 2.x version is not compatible with plug-ins such as _ head, so use 1.7.1 first (this is similar to Python2/3)

Pyes 0.99.5 has no FunctionScoreQuery.FieldValueFactor, 0.99.6 has

RTF version (configuration-free Chinese search)

Plug-in head: graphical web management page

Chinese word Segmentation plug-in-IK

To download the corresponding code according to the version, you need to install MVN and compile it yourself (recommended)

Extract the compiled zip file to the ES root directory / plugin/analyzerIK

Copy the config/ik of IK to the ES root directory / config/

Append to ES root directory / config/elasticsearch.yml

Index.analysis.analyzer.default.type: "ik" index: analysis: analyzer: ik: alias: [ik_analyzer] type: org.elasticsearch.index.analysis.IkAnalyzerProvider ik_smart: type: ik use_smart: true ik_max_word: type: ik use_smart: false

Just restart ES.

The RTF version is compiled, but I reported an error when I ported it to my own ES, but I was drunk with the official solution (see https://github.com/medcl/elasticsearch-analysis-ik/issues/48)

Test http://localhost:9200/your_index/_analyze?analyzer=ik&pretty=1&text=. I want to believe in Jesus and have eternal life.

| query | pyes usage |

The most important thing to care about in the display of search results is sorting.

Full-text search of ES. Default is based on _ score descending order.

Generally speaking, the algorithm of _ score can be understood. ES exposes API to adjust score TF/IDF... for us. See http://blog.csdn.net/dm_vincent/article/category/2718099 for details

Boosting in query-time is a common intervention (why not boostin index-time TODO)

FunctionScoreQuery allows us to have more influence on the final score, that is, sorting (what is the total number of TODO?)

FunctionScoreQuery.FieldValueFactor can use a field in the document to influence score

What is the experience about the use of ElasticSearch to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Version plug-in root directory search compilation experience content more Chinese help influence sort yes generally speaking that is full-text interest strength graphics fields Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Tech Info Linux MySQL Xiaomi