# Solr架构及概念分析

## 概念

Solr是一个基于Apache Lucene构建的搜索服务器，Apache Lucene是一个基于Java的开源信息检索库。

Solr是一个独立的企业级搜索应用服务器，它对外提供类似于Web-service的API接口。用户可以通过http请求，向搜索引擎服务器提交一定格式的XML文件，生成索引；也可以通过Http Get操作提出查找请求，并得到XML格式的返回结果。

## 特性

Solr是一个高性能，采用Java5开发，\
基于Lucene的全文搜索服务器。同时对其进行了扩展，提供了比Lucene更为丰富的查询语言，同时实现了可配置、可扩展并对查询性能进行了优化，并且提供了一个完善的功能管理界面，是一款非常优秀的全文搜索引擎。

![](https://3968733490-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ltduzq5HbUW-tbuGXOG%2F-Ltdv09qpubk7uvTDLPp%2F-LtdvARHChFgSVzqE3Zd%2Fimport-solr-01.png?generation=1573735152690888\&alt=media)

图solr-01

## 工作方式

文档通过Http利用XML 加到一个搜索集合中。

查询该集合也是通过http收到一个XML/JSON响应来实现。它的主要特性包括：高效、灵活的缓存功能，垂直搜索功能，高亮显示搜索结果，通过索引复制来提高可用性，提供一套强大Data Schema来定义字段，类型和设置文本分析，提供基于Web的管理界面等

![](https://3968733490-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ltduzq5HbUW-tbuGXOG%2F-Ltdv09qpubk7uvTDLPp%2F-LtdvARJCRCD5n6J0oJ_%2Fimport-solr-02.png?generation=1573735152611241\&alt=media)

图solr-02


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tuonioooo-notebook.gitbook.io/mass-data-lucene/solrpian/solrjia-gou-ji-gai-nian-fen-xi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
