一起使用Solr和Zends Lucene端口 [英] Using Solr and Zends Lucene port together

查看:108
本文介绍了一起使用Solr和Zends Lucene端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

午后,

在我使用Zend-Lucene-Search冒险之后,发现索引大型数据集并不能完全解决问题之后,我转向了Solr(感谢Bill Karwin的帮助:))

After my adventures with Zend-Lucene-Search, and discovering it isn't all its cracked up to be when indexing large datasets, I've turned to Solr (thanks to Bill Karwin for that :) )

我现在已经使Solr更快地为数据库建立索引,花了仅8分钟多的时间就为一个超过170万行的表建立了索引-我对此感到非常满意.

I've got Solr indexing the db far far quicker now, taking just over 8 minutes to index a table of just over 1.7million rows - which I'm very pleased with.

但是,当我尝试使用Zend端口搜索索引时,遇到了以下错误;

However, when I come to try and search the index with the Zend port, I run into the following error;

致命错误:/var/www/Zend/Search/Lucene.php:407中未捕获的异常"Zend_Search_Lucene_Exception",消息为不支持的段文件格式":堆栈跟踪:#0/var/www/Zend/Search/Lucene. php(555):Zend_Search_Lucene-> _ readSegmentsFile()#1/var/www/z_search.php(12):Zend_Search_Lucene-> __ construct('tmp/feeds_index')#2 {main}放在/var/www/Zend/中在第407行上搜索/Lucene.php

Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message 'Unsupported segments file format' in /var/www/Zend/Search/Lucene.php:407 Stack trace: #0 /var/www/Zend/Search/Lucene.php(555): Zend_Search_Lucene->_readSegmentsFile() #1 /var/www/z_search.php(12): Zend_Search_Lucene->__construct('tmp/feeds_index') #2 {main} thrown in /var/www/Zend/Search/Lucene.php on line 407

我试图四处搜寻,但似乎找不到任何与此问题有关的东西,每个人似乎都能够使他们工作?

I've tried to have a search around but can't seem to find anything about this problem, everyone just seems to be able to get them to work?

一如既往的帮助:)

谢谢

汤姆

推荐答案

我在机器上确认Zend_Search_Lucene无法读取通过Solr创建的Lucene索引.

I confirmed on my machine that a Lucene index created through Solr cannot be read by Zend_Search_Lucene.

Zend_Search_Lucene在检测到不支持的Lucene索引格式时,将引发该异常.查看代码,Zend当前支持2.1、2.1和2.3之前的格式.

Zend_Search_Lucene throws that exception when it detects a Lucene index format that it doesn't support. Looking at the code, Zend currently supports formats pre-2.1, 2.1, and 2.3.

Solr以FORMAT_HAS_PROX格式创建索引,据我所知,Lucene 2.9及更高版本使用了该索引.

Solr creates an index in format FORMAT_HAS_PROX which as far as I can tell is used by Lucene 2.9 and higher.

这篇关于一起使用Solr和Zends Lucene端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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