问题标签 [zend-search-lucene]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
zend-framework - Zend_Search_Lucene 和范围搜索
我的索引中有一堆 int 键字段,并尝试像这样进行简单的范围搜索:
这应该给我身高 120 到 180 之间的男性。但由于某种原因,我得到了这个例外:
我将如何调试这个?只是 Zend_Search_Lucene 有问题吗?
php - 使用 Lucene/PHP 索引大型数据库
下午的小伙伴们,
试图用 Lucene 的 Zend 端口索引一个 170 万行的表。在几千行的小型测试中,它工作得很好,但是一旦我尝试将行增加到几万行,它就会超时。显然,我可以增加 php 允许脚本运行的时间,但是看到 360 秒可以让我获得约 10,000 行,我不想考虑执行 170 万行需要多少秒。
我也尝试过让脚本运行几千次,刷新,然后运行接下来的几千次,但是这样做每次都会清除索引。
有什么想法吗?
谢谢 :)
java - 一起使用 Solr 和 Zends Lucene 端口
下午的小伙伴们,
在我使用 Zend-Lucene-Search 进行冒险之后,发现在索引大型数据集时并没有完全崩溃,我转向了 Solr(感谢 Bill Karwin :))
我现在让 Solr 索引数据库的速度要快得多,只需 8 分钟多一点就可以索引超过 170 万行的表——我对此感到非常满意。
但是,当我尝试使用 Zend 端口搜索索引时,遇到以下错误;
致命错误:未捕获的异常 'Zend_Search_Lucene_Exception' 和 /var/www/Zend/Search/Lucene.php:407 中的消息 'Unsupported Segments file format' 堆栈跟踪:#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/Search/Lucene .php 在第 407 行
我试图四处搜索,但似乎找不到关于这个问题的任何信息,每个人似乎都能让他们工作?
一如既往的任何帮助都非常感谢:)
谢谢,
汤姆
php - Can zend's lucene implementation be configured to use a mysql database instead of the file system?
Is there an option for Zend's lucene implementation (or a third-party plugin) that would allow me to put the lucene dictionary into a [MySQL] database?
The reason I need to ask is that the database is the only common resource for our two otherwise independent web servers.
php - 在 Zend Lucene PHP 中查询一个确切的字符串
我正在使用 Zend Search Lucene。但是我遇到了一些麻烦。我希望查询索引以获取确切的字符串,因此 page_name 是 test123,而不是任何模糊匹配。
目前我有:
并提出建议,谢谢!
php - 如何使用 Zend_Lucene 和 Zend_Paginator 优化大量数据库记录的索引
所以我有这个 cron 脚本,它在主机上使用 Cron 部署和运行,并为数据库表中的所有记录编制索引 - 该索引稍后用于站点的前端和支持的操作。
操作后,索引大约为 3-4 MB。
问题是它需要大量资源(CPU:30+ 和大量内存)并减慢机器速度。我的问题是关于如何优化下面描述的操作:
首先有一个使用 Zend Framework API 构建的选择查询,然后将该查询传递给一个分页器工厂,该工厂返回一个分页器,我用它来平衡当前被索引的项目数,而不是迭代太多的项目。该脚本使用 foreach 循环遍历分页器对象中的当前项目,直到到达末尾,然后在获取下一页的项目后从头开始。
我怀疑这种开销是由 Zend_Lucene 引起的,但不知道如何改进。
php - 如何使用 Zend Lucene 查找相似/相关的文本?
假设在您添加问题或 digg.com 之前,我需要像 stackoverflow 一样搜索相关标题,然后再提交新闻。
我没有找到如何使用 Zend Lucene 做到这一点的方法。有用于查询的 setSlop 方法,但据我了解,它没有帮助。
有没有办法进行这种搜索?
php - Zend_Search_Lucene range query error
I have set up each document with a date field. (keyword)
Values stored in it are in this format; 20100511
Each time I try to perform a ranged query, I get the following error:
At least one range query boundary term must be non-empty term
Anyone got a clue?
Update
I have gotten this to work programmatically. Does that mean the parser is buggy?
php - 扩展/改变 Zend_Search_Lucene 的搜索方式
我目前正在使用 Zend_Search_Lucene 来索引和搜索目前大约 1000 个左右的文档。我想做的是从当前的默认值更改引擎对文档的得分方式。
Zend_Search_Lucene 对文档中命中次数的频率进行评分,因此包含 10 次 PHP 匹配的文档将比仅包含 3次PHP匹配的文档得分更高。我想要做的是传递一些关键词并根据这些关键词的点击率来评分。例如
我通过 5 个关键词说,PHP,MySQL,Javascript,HTML和CSS我搜索的索引。一份文档与这些关键词有 3 个匹配项,一份文档具有全部 4 个匹配项,其中 4 个匹配项得分最高。文档中这些词的实例数量与我无关。
现在我已经快速浏览了 Zend_Search_Lucene_Search_Similarity 但是我不得不承认我不确定(或那么聪明)知道如何使用它来实现我所追求的。
我想用 Lucene 做些什么还是有更好的解决方案?
zend-framework - Zend Lucene - 无法搜索数字
使用 Zend Lucene 我无法在描述字段中搜索数字
像这样添加它:
谷歌搜索表明应用以下代码应该可以解决问题,但它没有......:
有什么想法吗?