简体   繁体   English

在Rails中搜索大型数据集

[英]Searching through large dataset in Rails

I am developing a Rails application. 我正在开发一个Rails应用程序。 I have a large dataset of static titles (about 3.5M) that I am searching a lot through. 我正在搜索大量静态标题的数据集(大约3.5M)。 For now the dataset stored in my PostgreSQL db and I am searching using postgres' index and text_pattern_ops . 现在,数据集存储在我的PostgreSQL数据库中,我正在使用postgres的index和text_pattern_ops This works pretty fast, but I am worried it might not scale, as my searches count supposed to increase rapidly. 这个工作速度非常快,但是我担心它可能无法扩展,因为我的搜索量应该会迅速增加。

I thought of storing my dataset in memory as an array and use bloom filtes/aho-coarsick to search, but not sure how or if it's a good approach. 我曾想将数据集作为数组存储在内存中,并使用bloom filtes / aho-coarsick进行搜索,但不确定如何或是否是一种好方法。

Basically, I am searching for a fast and scalable way to search in large dataset with Ruby on Rails. 基本上,我正在寻找一种快速且可扩展的方式来使用Ruby on Rails搜索大型数据集。

We use ElasticSearch, which integrates well with ruby on rails. 我们使用ElasticSearch,它与Rails上的ruby集成得很好。 http://www.elasticsearch.org/blog/unleash-the-clients-ruby-python-php-perl/#ruby http://www.elasticsearch.org/blog/unleash-the-clients-ruby-python-php-perl/#ruby

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

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