可以原始Lucene索引由Solr的加载? [英] Can a raw Lucene index be loaded by Solr?

查看:162
本文介绍了可以原始Lucene索引由Solr的加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一些同事们使用使用Lucene Java的内置搜索系统大的Java Web应用程序。我想要做的是有一个很好的基于HTTP的API来访问这些现有的搜索索引。我用的Nutch前,真的很喜欢的OpenSearch如何实施简单的做它来抓取结果RSS。

Some colleagues of mine have a large Java web app that uses a search system built with Lucene Java. What I'd like to do is have a nice HTTP-based API to access those existing search indexes. I've used Nutch before and really liked how simple the OpenSearch implementation made it to grab results as RSS.

我试过设置Solr的DA​​TADIR solrconfig.xml中,希望它会高兴地拿起现有的索引文件,但它似乎不理会他们。

I've tried setting Solr's dataDir in solrconfig.xml, hoping it would happily pick up the existing index files, but it seems to just ignore them.

我的主要问题是:

的Solr可以被用来访问已经创建Lucene索引?或者,也许会有更好的解决办法?

推荐答案

我从来没有尝试过这一点,但你必须调整schema.xml中包括,在您的Lucene索引文件的各个领域,因为Solr的将不允许你如果它不是在schema.xml中定义搜索字段

I have never tried this, but you would have to adjust the schema.xml to include all the fields of the documents that are in your Lucene index, because Solr won't allow you to search for a field if it is not defined in schema.xml.

的调整schema.xml中还应该包括定义查询时间分析仪在你的领域寻找正确的,特别是如果在那里使用自定义索引分析领域。

The adjustment to schema.xml should also include defining the query-time analyzers to properly search in your field, especially if the field where indexed using custom analyzers.

在solrconfig.xml中,你可能不得不更改indexDefaults设置和mainIndex部分。

In solrconfig.xml you may have to change settings in the indexDefaults and the mainIndex sections.

不过,我很乐意阅读究竟是谁做的人的答案。

But I'd be happy to read answers from people who actually did it.

这篇关于可以原始Lucene索引由Solr的加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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