简体   繁体   English

Solr提高搜索速度

[英]Solr improve Search speed

in solr search how to optimizing to improve Solr search Speed. 在Solr搜索中如何优化以提高Solr搜索速度。 I try with different Cache mechanism but not work.we are using 65 million record to search using solr search.it takes approx. 我尝试使用不同的缓存机制,但不起作用。我们使用solr search使用6500万条记录进行搜索。 45 sec. 45秒 to search. 搜索。 but i want to search 65 million record approx. 但我想搜索大约6500万条记录。 5-10 sec. 5-10秒 so friend suggest me to reduce the search time. 所以朋友建议我减少搜索时间。 i am using Apache Solr (Ver. 5.2.1) . 我正在使用Apache Solr(5.2.1版)。

You can create multiple core where in you can split your data into different cores. 您可以创建多个核心,在其中您可以将数据拆分为不同的核心。 As the data gets divided/split in different cores, the search is limited to the core and limited indexed data which could improve your search speed. 由于数据被分为不同的核心,因此搜索仅限于核心和有限的索引数据,这可以提高搜索速度。

In my case I have data of different category so created the cores for each category. 就我而言,我拥有不同类别的数据,因此为每个类别创建了核心。 Cores are created by category name. 核心按类别名称创建。 When a search request comes for a category, the search request is made only to that category. 当搜索请求针对某个类别时,搜索请求仅针对该类别。

The second approach is you can do the sharding which will again split the data into different shard. 第二种方法是可以进行分片,这将再次将数据拆分为不同的分片。 Here each shard will hold the index data. 在这里,每个分片将保存索引数据。

When data is too large for one node, you can break it up and store it in sections by creating one or more shards. 当数据对于一个节点而言太大时,您可以通过创建一个或多个分片将其分解并存储在部分中。 Each is a portion of the logical index, or core, and it's the set of all nodes containing that section of the index. 每个节点都是逻辑索引或核心的一部分,是包含该索引部分的所有节点的集合。

It is highly recommended that you use SolrCloud when needing to scale up or scale out. 强烈建议您在需要扩展或扩展时使用SolrCloud。

Below are the links which will help you on the solrCloud 以下是对solrCloud有帮助的链接

https://cwiki.apache.org/confluence/display/solr/Distributed+Search+with+Index+Sharding https://cwiki.apache.org/confluence/display/solr/Distributed+Search+with+Index+Sharding

https://cwiki.apache.org/confluence/display/solr/Shards+and+Indexing+Data+in+SolrCloud https://cwiki.apache.org/confluence/display/solr/Shards+and+Indexing+Data+in+SolrCloud

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM