• Python technique: implement simple tokenizer with re module


    A simple tokenizer The tokenization task is the most common task in Python string processing. Here we will explain how to build a simple expression tokenizer with regular expressions, which can parse the expression string from left to right into a stream of tokens. Give the following expression string: text = ‘foo = 12 + […]

  • Introduction to elasticsearch


    1 what is elasticsearch? Elasticsearch is a distributed and restful search and data analysis engine, which can solve the emerging use cases.Elasticsearch is a distributed, high expansion, high real-time search and data analysis engine. It can easily make a large number of data have the ability of search, analysis and exploration. Making full use of […]

  • es7. X (7) – match_phrase


    phrase:[freɪz]phrase 1. Brief introduction match_ The phrase query analyzes the text and creates a phrase query based on the analyzed text. match_ Phrase will segment the search keywords. match_ The word segmentation results of phrase must be included in the word segmentation of the retrieved field. By default, the order must be the same and […]

  • Docker builds elasticsearch and kibana


    1、 Elasticsearch 1 pull ElasticSearchThe docker image of does not support the default latest label, so you need to specify the label when pulling: docker pull elasticsearch:7.12.0 2 create a network connection Used to communicate with other container services, such as kibana. docker network create es-test 3 Create container docker run -itd –name es –net […]

  • Elasticsearch search engine


    Official website:Elasticsearch: the official distributed search and analysis engine | elastic Elaticsearch, abbreviated as es, is aOpen source and highly extensible distributed full-text retrieval engine, it can be close toReal time storage and retrieval of data; It has good scalability and can be extended to hundreds of servers to process Pb level data. Es also […]

  • Those things of memory elasticsearch — data structure and ingenious algorithm


    Series catalog What happened to the memory swallowing beast — get to know it Those things of memory elasticsearch — data structure and ingenious algorithm Those things of memory swallowing beast — Architecture & three high guarantees Those things of memory swallowing beast — the principle of write search Those things about memory swallowing beast […]

  • Streaming loading of corpus


    os. Listdir (‘data / ‘) # input the folder name and output the folder name or document name list under the folder ##Corps streaming class MySentences(object): def __init__(self, dirname): self.dirname = dirname def __iter__(self): for fname in os.listdir(self.dirname): Print (‘processing file {} ‘. Format (fname)) for line in smart_open(os.path.join(self.dirname, fname), ‘r’,encoding=’utf-8′): line = line. Lower() […]

  • [es] operate es cluster through API


    ES is a search engine for massive data query, which is widely used in full-text retrieval, log analysis, monitoring analysis and other scenarios. ES has three features to easily support various complex query conditions: 1. Distributed real-time file storage adopts inverted index, user-defined scoring, sorting ability and rich word segmentation plug-ins to realize the full-text […]

  • Rethinking index from regular search


    Recently, the loading time of some query interfaces has gradually become longer. It is found that it is because there is regular search in the filter criteria, but we also set the index for these fields in a conventional way. Non regular search has no impact, so the most intuitive idea is: regular search is […]

  • Elasticsearch install IK word splitter (Online + offline)


    1. Online networking installation Directly enter the container for editing #Enter the container for internal editing, or execute elasticsearch plugin in the bin directory under elasticsearch docker exec -it elasticsearch bash #Install the IK word breaker plug-in (GitHub official website) elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.7.0/elasticsearch-analysis-ik-6.7.0.zip #Or accelerate download (third-party acceleration) elasticsearch-plugin install https://github.91chifun.workers.dev//https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.7.0/elasticsearch-analysis-ik-6.7.0.zip Wait for the download […]

  • Elasticsearch realizes commodity search


    prepare If you don’t know about elasticsearch, you can read another article from me firstAfter reading this elasticsearch, you can’t beat meFirst, have a basic understanding of elasticsearch. 1、 Install and run elasticsearch Before downloading, you should ensure that your Java version is kept at 1.8 or above. This is a hard requirement of elasticsearch. […]

  • Installing elasticsearch using laradock


    Installing elasticsearch using laradock Elasticsearch visualizer elastichq / Official website address Installation and use usedocker-compose upCommand runElasticSearchcontainer docker-compose up -d elasticsearch Open the browser and through the port9200Access local hosthttp://localhost:9200 The default user is user and the default password is change If used in laradock curl http://elasticsearch:9200 Install elasticsearch plug-in #Install an elasticsearch plug-in docker-compose […]