Describes the practice of Elastic Search engine in SpringBoot.
Lab Environment
ES version: 5.3.0
Spring bt version: 1.5.9
First of all, we need to install the elastic search environment. We 'd better install the visualization plug-in elasticsearch-head to make it easy
: for example I want to search the keyword "nanjing"We enter in the browser:http://localhost:6325/entityController/search?name=南京The search results are as follows:The four records that were inserted in the 5 records that contain the keyword "nanjing" are searched!Of course, here is the standard word segmentation, will each Chinese as a term, which contains the "S
Source code download: http://download.csdn.net/detail/y85171642/7209727
OpeningBefore getting started with the code, I would like to explain why I wrote this program. When I was a junior, I learned C # And came into contact with GDI +. I found that the original graphic interface program could be as simple as that. Then began to use GDI + to start animation, games, etc., which has a simulated multi-ball collision, In the CSDN have shared (http://pan.baidu.com/s/1qWjTkmS ), but now I think there
Objective: To use the effectsearch package in a website for search
Implementation result:
First, download the elastic tsearch package (online installation is not required, I downloaded it locally), and install the elastic tsearch package as prompted in developer> packages> install local package, the result after installation is as follows:
Installed pack
No. 371, Python distributed crawler build search engine Scrapy explaining-elasticsearch (search engine) with Django implementation of my search and popularThe simple implementation principle of my search elementsWe can use JS to a
Elastic Search is the equivalent of a database search engine in the application of data analysis.Like MySQL, it has its own query language, but it's not a relational database, it's nosql.Data can be quickly accessed from the distributed server file system based on the index. MySQL database and tables are stored on a se
To figure out how the relevance of the document search was calculated behind elastic search, I decided to do my own experiments to exploreThis blog is a good one to say.http://blog.csdn.net/dm_vincent/article/details/42099063And the blog itself is just translating official documentsHttps://www.elastic.co/guide/en/elasticsearch/guide/current/scoring-theory.htmlI'm
Technorati Tags: elastic search,query,commandsBasic query: The simplest way to queryquery:{"term": {"title": "Crime"}}Terms: The target column contains the specified wordMatch: The input "phrase" will be broken down into wordsBOOL Match:match is decomposed into multiple words, and is the relationship of and, by default, or.Match phrase: participle, but to specify the number of words between participlesMatch
Elastic search6.2.2 Implementation of search records query, similar to Sina Weibo, the same search record in the back of the time will cover the previous (main idea: keywords to heavy, and then sorted by time)Create an index first// My search PUT my_search{ "Settings": { "Number_of_replicas": 0 }, "mapp
No. 371, Python distributed crawler build search engine Scrapy explaining-elasticsearch (search engine) with Django implementation of my search and popularThe simple implementation principle of my search elementsWe can use JS to a
The first is to download Elasticsearch https://www.elastic.co/downloads, unzip;
Then downloaded the Chinese parser Ik,github search Elasticsearch-ik can find, Https://github.com/medcl/elasticsearch-analysis-ik
IK download down is an IK source code that needs to run maven to generate IK jar packages, different ES versions correspond to different jar packages, which are clearly stated on GitHub's homepage;
Locate the bin in the directory after
Startup error message:
Write the image description here
Find the main information: failed to obtain node locksWrite the image description hereAn error occurred while binding nodes !!!Many people have also encountered this problem after Baidu, probably because the elasticsearch has not been properly closed.Step 1: run the command: PS aux | grep 'elasticic 'To View Details. For example:Write the image description here
Step 2: run the command kill-9 to disable the process.Step 3: restart es ..
Script opening functionIn the latest version of Elasticsearch, the dynamic scripting feature is disabled by default based on security considerations (if not available). If disabled, the following error is reported when using the script:scripts oftype[inline], operation [update] and lang [groovy] are disabledYou can fully turn on the dynamic scripting feature in the Config/elasticsearch.yml file, and add the following code at the end:Script.inline:onScript.indexed:onScript.file:onAfter configurat
, write the logical processing functionImplementing search data in logical processing functions(1) Get the user's search terms(2) using the native Elasticsearch (search engine) interface, to achieve the search, annotated:ELASTICSEARCH-DSL is on the original Elasticsearch to
Before we talked about the Elasticsearch (search engine) operation, such as: Add, delete, change, check and other operations are used Elasticsearch language commands, like SQL command, of course Elasticsearch Official also provides a python operation Elasticsearch (search engine) interface package, just like the SQLAlc
Logical processing functionsCalculate Search Time-consumingBefore starting the search: Start_time = DateTime.Now () Gets the current timeAt the end of the search: End_time = DateTime.Now () Gets the current timeLast_time = (end_time-start_time). Total_seconds () end time minus start time equals times, converted to secondsFrom django.shortcuts import render# Creat
(C.cookiejar,"./cookie.txt ") c.setopt (C.writefunction, T.body_callback) c.perform () C.close () Print (t.contents)Extended:Do you normally initiate HTTP requests Google will tell you "302 Moved", OK, a closer look at this code, will also solve your problemReference:Http://superuser.com/questions/482470/google-302-moved-in-firefoxHttp://stackoverflow.com/questions/22570970/php-search-by-image-google-curl-return-302-moved Pylibcurl HTTPS
There are a lot of webmaster in the process of optimizing the site is very afraid of search engine, feeling search engine is king Lao Tze, all day is hiding far away, beware of search engines. In fact, the search
Open source search engine Toolkit
1. Lucene
Lucene is currently the most popular open-source full-text search engine toolkit. It is affiliated to the Apache Foundation and initiated by Doug Cutting, a senior full-text indexing/retrieval expert, take the name of the project as the name of his wife. Lucene is not a full-
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.