solr

Span Queries in SOLR

旧街凉风 提交于 2019-12-11 12:29:28
问题 How does one issue span queries in SOLR (Span, SpanNear, etc)? I've done a bit of research and I can't tell of a straightforward way to do it. It would seem that I need to implement a QueryParserPlugin to accomplish what I want to do. Is this the correct path? Surely this has been done before. Does anybody have links to examples? I had trouble finding anything. 回答1: Span queries aren't currently supported (JIRA issue here). Judging by this mail thread, it seems that you're on the correct path

integrate wordnet with solr

放肆的年华 提交于 2019-12-11 12:28:34
问题 I am trying to integrate wordnet api in to Apache solr. But it is not seems to be working and there is no good documentation as well. Could you please post me the steps if any body has experience on it? 回答1: There are more than one way to do this: 1) https://issues.apache.org/jira/browse/LUCENE-2347 2) https://gist.github.com/562776 These are simple Java classes, which extract the synonyms from WordNet's prolog file - more or less the same way. Hope this helps. Péter 来源: https://stackoverflow

Solr/Lucene user click based ranking

牧云@^-^@ 提交于 2019-12-11 12:23:46
问题 I am facing the problem of sort Lucene results based on user click log. I would like that more accessed results comes first. Does anyone knows how to configure or implement such property in Lucene or Solr? Thank you very much. 回答1: You can declare a sortable integer field (let's call it clickNum) in your schema, setting it to zero by default for each indexed document. When a user opens a document your app triggers an update of clickNum field by setting clickNum = clickNum + 1. At query-side

How to compare two columns using Solr?

*爱你&永不变心* 提交于 2019-12-11 12:13:32
问题 Compare two columns in solr if two fields are equal display true or else false. CASE WHEN o_is_follow = o_follow_id THEN 'TRUE' ELSE 'FALSE'. 回答1: As per as I know comparing one field to another within a document is not supported in either Solr . I think it can be achieved by one option of creating another field while indexing only. You can have another field (boolean) . Make this field as boolean type and can be used while searching. Create a o_is_follow_present field and set it to true for

Connecting Titan To Solr

断了今生、忘了曾经 提交于 2019-12-11 11:59:37
问题 I am trying to connect titan to solr. The properties file I am using is titan-cassandra-solr.properties : index.search.backend=solr index.search.solr.mode=cloud index.search.solr.zookeeper-url=localhost:2181 I have configured my titan core to be: name: titan instance: /opt/solr-titan/titan data: /opt/solr-titan/data inside /opt/solr-titan/titan I have a conf directory which contains all the files I copied from titandb/conf/solr . When I use gremlin.sh and try: gremlin> graph = TitanFactory

How to index blob field in Apache Solr indexing?

六眼飞鱼酱① 提交于 2019-12-11 11:52:04
问题 I am using Apache Solr to index my data, I have blob field which I want to be indexed too...but I dont know what is the fieldType to be declared in the 'scheme.xml'.... I tried following: " field name="abstract" type="text" indexed="true" stored="true" required="true" " but when I tried to search then that field is shown as : id, abstract, title, price, publishedDate 1, [B@1e9b7b2, Spain Consumer, 3795.0, 2009-01-19T18:30:00Z 'abstract' is my blob filed which is nothing but big string...and I

How to get results in sorted order when I use facet limit in solr?

喜夏-厌秋 提交于 2019-12-11 11:42:11
问题 Usually a solr query with facetting option returns the results in sorted order based on the facet count. When I set the facet limit to -1 the results were not returned in sorted order; this means I have to do the sorting manually in the server side. Should I need to append anything more in the solr query to get it in a sorted order? 回答1: please try facet.sort=count The default facet order is base on the count, descending order, but it will return the index order rather than count desc order

solr 相似查询-MoreLikeThis

你。 提交于 2019-12-11 11:31:50
在我们使用网页搜索时,会注意到每一个结果都包含一个 “相似页面” 链接,单击该链接,就会发布另一个搜索请求,查找出与起初结果类似的文档。Solr 使用 MoreLikeThisComponent(MLT)和 MoreLikeThisHandler 实现了一样的功能。如上所述,MLT 是与标准 SolrRequestHandler 集成在一起的;MoreLikeThisHandler 与 MLT 结合在一起,并添加了一些其他选项,但它要求发布一个单一的请求。我将着重讲述 MLT,因为使用它的可能性更大一些。幸运的是,不需要任何设置就可以查询它,所以您现在就可以开始查询。   MLT 要求字段被储存或使用检索词向量,检索词向量以一种以文档为中心的方式储存信息。MLT 通过文档的内容来计算文档中关键词语,然后使用原始查询词语和这些新词语创建一个新的查询。提交新查询就会返回其他查询结果。所有这些都可以用检索词向量来完成:只需将 termVectors="true" 添加到 schema.xml 中的 <field> 声明。 1、solrconfig.xml配置 要想使用匹配相似首先在 solrconfig.xml 中配置 MoreLikeThisHandler <requestHandler name="/mlt" class="solr.MoreLikeThisHandler"> <

Solrnet facet returning spaces

為{幸葍}努か 提交于 2019-12-11 11:31:33
问题 I'm using Solrnet to return search results and am also requesting the facets, in particular categories which is a multi-valued field. The problem I'm coming up against is that the category "house products" is being returned as two seperate facets because of the space. Is there a way of ensuring this is returned as a single facet value, or should I be escaping the value when it is added to the index? Thanks in advance Al 回答1: If the tokens are generated for house products then you are using

Solrj formats my dates from UTC to CEST

我们两清 提交于 2019-12-11 11:28:22
问题 I just discovered a problem with a date field in my application. I have a date field that is indexed in Solr in UTC format. For instance, "parution_date": "2014-09-29T22:00:00Z", . When I make request to Solr using a pivot, and I want to get this value, Solr converts my date to CET (I'm in Europe). Here the date I received for the same document: Tue Sep 30 00:00:00 CEST 2014 . As you see here, instead of keeping the date to its original format which is UTC, it converts the date CEST. I want