solr

Limiting / Filtering multivalue fields in Solr

久未见 提交于 2019-12-24 01:52:59
问题 Is there a way to limit, or filter, the returned text of a multivalued field in Solr? Given the following document structure in Solr: ... <doc> <str name="title">example</str> <arr name="foo"> <str>bar1</str> <str>bar2</str> <str>bar3</str> <str>bar4</str> <str>bar5</str> <str>bar6</str> </arr> </doc> ... I'd like to limit the response to only show 1 of the "foo" values based on a Filter Query request. So for example, the query: select/?q=example&fq=foo:bar2` I would want a response of: ...

Solr- multivalued date field, range queries to match “any”/“count”?

天涯浪子 提交于 2019-12-24 01:44:58
问题 I'm using Solr as part of a property booking engine- my entries have a multivalued date field which stores the dates that the property is already booked, and thus, not available. I want to be able to query against this, and return entries that have no dates within the window specified. I'm half way there- but right now Solr appears to be returning the entry if it has even one free date- I want it to only return entries that are totally empty within the range. Example of my entity: <doc> <arr

Price Range Filter with Slider UI with Min & Max value from Solr in same query?

余生长醉 提交于 2019-12-24 01:27:56
问题 I'm working on an Solr integration for an e-commerce site. I want to offer a jQuery Slide Range UI (refer http://jqueryui.com/slider/#range). So visitor will be offered with a slider with min and max price on the page which they can use to define a range and accordingly the filter is applied. On Solr side, I understand how to make a range filter query on this. However, for displaying a range I need min and max price value. I'm not sure how to get this from Solr. Moreover, when other facets

搜索引擎框架介绍

一曲冷凌霜 提交于 2019-12-24 01:26:38
原文: 搜索引擎框架介绍 一、搜索引擎基础介绍 二、常见搜索引擎框架介绍与比较 三、参考文章 一、搜索引擎基础介绍 1. 什么是搜索引擎   搜索引擎,通常指的是收集了万维网上几千万到几十亿个 网页 并对网页中的每一个词(即关键词)进行索引,建立 索引数据库 的 全文搜索引擎 。当用户查找某个关键词的时候,所有在页面内容中包含了该关键词的网页都将作为搜索结果被搜出来。再经过复杂的算法进行排序(或者包含商业化的竞价排名、商业推广或者广告)后,这些结果将按照与搜索关键词的相关度高低(或与相关度毫无关系),依次排列。 2. 传统的搜索与搜索引擎对比 2.1 传统做法 (1)文档中使用系统的Find查找 (2)mysql中使用like模糊查询 存在问题: (1)海量数据中不能及时响应,少量数据可以通过传统的MySql建立索引解决 (2)一些无用词不能进行过滤,没法分词 (3)数据量大的话难以拓展 (4)相同的数据难以进行相似度最高的进行排序 2.2 搜索引擎做法 (1)存储非结构化的数据 (2)快速检索和响应我们需要的信息,快-准 (3)进行相关性的排序,过滤等 (4)可以去掉停用词(没有特殊含义的词,比如英文的a,is等,中文: 这,的,是等),框架一般支持可以自定义停用词 二、常见搜索引擎框架介绍与比较 1. Java 全文搜索引擎框架 Lucene 1.1 简介  

Return only results that match enough NGrams with Solr

不问归期 提交于 2019-12-24 01:25:12
问题 To achieve some degree of fault tolerance with Solr I have started to use the NGramFilterFactory . Here are the intersting bits from the schema.xml : <field name="text" type="text" indexed="true" stored="true"/> <copyField source="text" dest="text_ngram" /> <field name="text_ngram" type="text_ngram" indexed="true" stored="false"/> <fieldType name="text_ngram" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.KeywordTokenizerFactory" /> <filter class="solr

Does Solr 7.x have support for Java 11?

匆匆过客 提交于 2019-12-24 01:12:51
问题 Currently our applications runs with Spring Data Solr + Apache Solr 5.3 + Java 8 We are upgrading our systems to Java 11. Does Spring Data Solr & Apache Solr latest version support Java 11 ? 回答1: Solr 7.6 supports "Java 8 or greater". However . . . . As per the Solr News it looks like 10 is tested and supported Java is generally backwards compatible although Java 11 release notes might suggest has some backwards compatibility issues that might trip folks up in general This ticket in the Solr

Solr - Java out of memory

左心房为你撑大大i 提交于 2019-12-24 00:56:23
问题 I have an application that creates a rather large Solr 3.6 index, approx. 300GB with 1B documents divided into 10 cores each day. Indexing works great, and I’m using a round-robin algorithm to distribute the docs evenly between the cores. Searches work great for me too up to the point that the return result set is greater than 100K+ documents. At that point, I get a java error returned: either OutOfMemoryError or SolrException: parsing error My searches are simple, not using wildcards or

Error using progress bar: Max must be a positive integer

情到浓时终转凉″ 提交于 2019-12-24 00:53:30
问题 Whenever I reindex a with solr, I get the following error $ RAILS_ENV=development rake sunspot:solr:reindex Error using progress bar: Max must be a positive integer How do I fix this? 回答1: The possible reason is, your database to reinstall has no data. The progress bar is to show "how much has reindexed / how much records in DB". So if you have no data, the progress bar can't be initialized. Sunspot is expected to show a better error message 来源: https://stackoverflow.com/questions/26435813

Trying to implement scoped autosuggestions with solr

前提是你 提交于 2019-12-24 00:48:41
问题 I am trying to implement scoped autosuggestions like in ecommerce websites like amazon etc. eg. if i type Lego , the suggestions should come like Lego las in Names Lego in Toys where Names and Toys are solr field names. closest aid i got is from this discussion: solr autocomplete with scope is it possible? Which informed me that it isn't possible with the suggester which I am currently using. Until now, using the suggester I am able to achieve autosuggestions from a single solr field. [the

datetime field in solr schema

左心房为你撑大大i 提交于 2019-12-24 00:42:34
问题 I am using Solr to make search on my database, and i need to get a field with (datetime) data type from mysql database, so i set the select query to get this field in dataconfig.xml, and i added field name for this field in schema.xml as follow: <field name="parsed_at" type="datetime" indexed="true" stored="true" /> but solr didn't do any indexing after these modifications. i have tried to select date(parsed_at) as parsed_at ... and to specify type as date in schema.xml, but this didn't work