我使用SOLR点击突出显示功能在文档中设置与查询匹配的突出显示。
问题是其中一个字段包含有效的HTML,但高亮显示返回的片段不是有效的HTML,这就是为什么渲染后整个页面布局被破坏的原因。
例如query field:lucene get me this document:
<p><a href="/some/link">Here is the discussion, what the difference between SOLR, Elasticsearch and Lucene</a></p>
突出显示的片段是Elastic
我有这样的疑问:
SELECT * FROM [cq:Page] WHERE ISDESCENDANTNODE("/content/some/specific/path")
AND LOWER([jcr:content/depth1/depth2/depth3/depth4/prop1]) = "someValue"
AND LOWER([jcr:content/depth1/depth2/depth3/depth4/prop2]) = "someOtherValue"
我实现了一个橡木lucene-属性索引如下:
<myIndex
当我运行Nutch并且链接不再存在时,我可以运行readdb命令,它向我显示有标记为db_gone的urls。
所以我运行了SolrClean命令,它说:
SolrClean deleting a total of 1 documents
这是正确的,但是没有任何东西从Solr中删除。
帮助?
如果您想检查我的配置,那么我有一个博客,其中包含了我自己的Solr/Nutch设置是如何配置的。
编辑
很有可能不仅仅是SolrClean命令不起作用,我有一种感觉,这与我的设置有关,在那里删除没有提交?
这是为该文件发出的删除请求--但该文档存在:
INFO - 2013-08-09 15:54:5
public function searchIndex($entity)
{
//http://framework.zend.com/manual/2.0/en/modules/zendsearch.lucene.searching.html#
//http://stackoverflow.com/questions/7805996/zend-search-lucene-matches
//http://framework.zend.com/manual/2.0/en/modules/zendsearch.lucene.index-cre
在lucene中索引时,我创建的文档如下:
Document document = new Document();
Field fileNameField = new Field("name",
name,
Field.Store.YES,Field.Index.ANALYZED);
Field filePathField = new Field("code",
code,
Field.Store.YES,Field.Index.NOT_ANALYZED);
我想在apache中删除一个只有完全匹配的文档。例如,我有包含文本的文档:
Document1: Bilal
Document2: Bilal Ahmed
Doucument3: Bilal Ahmed - 54
当尝试删除带有查询'Bilal‘的文档时,它会删除所有这三个文档,而应该只删除与之完全匹配的第一个文档。
我所用的守则是:
String query = "bilal";
String field = "userNames";
Term term = new Term(field, query);
我正在用lucene.net进行索引和搜索,唯一的问题是我的代码没有找到任何匹配时搜索“mvc2”(它似乎与我搜索的所有其他单词),我已经尝试了不同的分析器(请参阅分析器的注释)和旧的lucene.net代码,这是我的索引和搜索代码,如果有人能告诉我哪里出了问题,我会非常感谢,谢谢。
////Indexing code
public void DoIndexing(string CvContent)
{
//state the file location of the index
const string indexFileLocation = @
因此,正如在标题中,当我试图搜索一个查询时,我会得到一个错误
在没有位置数据的情况下,对线程“java.lang.IllegalStateException: java.lang.IllegalStateException”内容中的java.lang.IllegalStateException异常进行索引;无法运行在org.apache.lucene.search.PhraseQuery$1.getPhraseMatcher(PhraseQuery.java:497) at org.apache.lucene.search.PhraseWeight.scorer(PhraseWeight.ja
我(通过Java程序)添加了SOLR索引中的文档索引,但是在add(inputDoc)方法之后有一个例外。solr接口中的登录包含以下内容:
Caused by: java.lang.IllegalArgumentException: Document contains at least one immense term in field="text" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer