我可以仅使用Solr来搜索现有的Lucene索引吗? [英] Can I use Solr just for search an existing Lucene index?

查看:72
本文介绍了我可以仅使用Solr来搜索现有的Lucene索引吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地使用Lucene为文档编制索引.我知道如何很好地使用Lucene.我从未使用过Solr,但我想使用Lucene索引来运行网络搜索,因此现在正在研究它.

I use Lucene locally to index documents. I know how to use Lucene pretty well. I never used Solr but I want to run a web search using a Lucene index so I'm now looking into it.

我可以说在EC2上安装Solr,然后不使用Solr为文档编制索引,而是直接使用Lucene在本地进行处理,然后仅将Lucene索引从我的计算机复制到Solr将用于搜索的EC2吗?

Can I install Solr on EC2 let's say, and then instead of indexing documents using Solr, doing it locally using Lucene directly and then just coping the Lucene index from my machine to EC2 which Solr will be using for search?

我假设只要将索引保留在磁盘上就可以,但是我想确定.

I'm assuming it's possible as long as I keep the index on disk but would like to be sure.

谢谢!

推荐答案

当然有可能,您只需确保保持完全相同的索引结构(由Solr模式定义).但是,这也意味着您的配置将存储在两个完全独立的位置-例如每次您在Lucene中更改分析器时,都需要在Solr XML配置中同步此更改.我不确定Solr会给这种用例带来什么好处.

It's certainly possible, you would only make sure to maintain the exactly the same index structure (defined by Solr schema). However, it would also mean that your configuration would be stored in two completely separate places -- e.g. each time you would change an analyzer in Lucene, you would need to synchronize this change in Solr XML configuration. I'm not sure what benefit would Solr bring in such use case.

这篇关于我可以仅使用Solr来搜索现有的Lucene索引吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆