solr

Can we use Phonetic token and Synonyms together?

给你一囗甜甜゛ 提交于 2019-12-24 00:28:15
问题 I am trying to enable phonetic analyzer, and synonyms together. It doesn't seem to work. Is it wrong to use them together? In the below implementation I would expect the search query be converted using synonyms and then phonetic analyzer be used to retrieve the results. But my synonyms are totally ignored in here. If i remove the phonetic analyser as part of the index creation, then the synonyms are working fine. Also, the synonyms work fine if i use the in built analyzers like en.microsoft ;

Convert SOLR query to ElasticSearch URI format

﹥>﹥吖頭↗ 提交于 2019-12-24 00:17:47
问题 I've moved my SOLR core documents to ElasticSearch index. Now I need to convert my SOLR query parameters to ES format. I've seen the ES documentation here https://www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html but ES doesn't have all the URI query parameters with name like fq , group , boost , facet etc. From the documentation I came know below query parameters mapping between SOLR and ES. May be I am missing others, Please let me know those. SOLR to ES : fl -

how to search all / wildcard in lucern solr

試著忘記壹切 提交于 2019-12-24 00:06:53
问题 I'm using RoR + acts_as_solr to query a Solr database. I'm used to using "*" to select all, thanks to MySQL, but that command fires an exception in Solr. Are they other wildcards I can use? Suggestions? Thanks! 回答1: You can't query for "all" in lucene. The typical way to do it is to add a field with the same value for all documents and query for that value. 回答2: In Solr you can get all documents by querying *:* (except for pagination, that's another topic) 回答3: I prefer [* TO *] when I have

Solr 4.6.0 DataImportHandler speed up performance

断了今生、忘了曾经 提交于 2019-12-24 00:04:11
问题 I am using Solr 4.6.0 , indexing about 10'000 elements at a time and I suffer bad import performance. That means that importing those 10'000 documents takes about 10 minutes. Of course I know, that this hardly depends on the server hardware, but I still would like to know, how any performance boosts could be done and which of them are actually useful in real-world situations (joins etc.)? I am also very thankful for precise examples and not just links to the official documentation. Here is

ClassCastException when trying to apply custom filter in solr

纵然是瞬间 提交于 2019-12-23 23:55:28
问题 I'm using 4.10.3 solr and after I implemented Factory with Filter import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.util.TokenFilterFactory; import java.util.Map; public class CustomFilterFactory extends TokenFilterFactory { protected CustomFilterFactory(Map<String, String> args) { super(args); } @Override public TokenStream create(TokenStream tokenStream) { return new CustomFilter(tokenStream); } } and when Solr starts, I'm getting strange errors in log: Caused

Mixing Solr range function with additional parameters

北城以北 提交于 2019-12-23 23:30:24
问题 I have a range function in a Solr fq that works as expected: {!frange l=1 u=2}sum(termfreq(tags,'twitter'),termfreq(tags,'facebook'),termfreq(tags,'pinterest')) However, if I try to further refine it by adding an additional parameter to the end: {!frange l=1 u=2}sum(termfreq(tags,'twitter'),termfreq(tags,'facebook'),termfreq(tags,'pinterest')) AND (region:"US") I get the error: org.apache.solr.search.SyntaxError: Unexpected text after function: AND (region:"US") If I try to prepend an

Lucene OR query not working

ⅰ亾dé卋堺 提交于 2019-12-23 23:15:09
问题 I am trying to query Solr with following requirement: _ I would like to get all documents which not have a particular field -exclusivity:[* TO *] I would like to get all document which have this field and got the specific value exclusivity:(None) so when I am trying to query Solr 4 with: fq=(-exclusivity:[* TO *]) OR exclusivity:(None) I have only got results if the field exists in document and the value is None but results not contain results from first query !! I cannot understand why it is

solr5.5.4 添加mysql数据,实现同步更新

扶醉桌前 提交于 2019-12-23 22:40:22
相关文章: 第一篇要是安装部署 , 第二篇如何定时同步mysql数据 。 第三篇solr实战关键字查询全库 1. 导入 jar 包。将目录 E:\solr\test\solr-5.5.4\dist 下的两个 jar 包, solr-dataimporthandler-5.5.4.jar solr-dataimporthandler-extras-5.5.4.jar , 还又 mysql 驱动的 jar 导入 E:\solr\test\apache-tomcat-8.5.20\webapps\solr\WEB-INF\lib 下。 2. 复制 E:\solr\test\solr-5.5.4\server\solr\configsets\data_driven_schema_configs\conf, 放到 3.E:\solr\test\solrhome\core1 下,编辑 E:\solr\test\solrhome\core1\conf\solrconfig.xml 添加 <lib dir="../webapps/solr/WEB-INF/lib" regex=".*\.jar" /> ,位置如图,相对路径,相对的是 tomcat 的 bin 路径,和上面一样的道理。然后搜索 class="solr.SearchHandler" ,在此句上面添加 <requestHandler

Exception indexing polygons with solr (jts not found?)

£可爱£侵袭症+ 提交于 2019-12-23 22:07:43
问题 I'm having trouble setting up solr 4.10.2 to work with polygons. I try to adapt the example application to work with an field called geom with the type location_rpt . I added jts-1.13.jar to the file solr-4.10.2/example/webapps/solr.war in the directory WEB-INF/lib and I created a field in schema.xml: <field name="geom" type="location_rpt" indexed="true" stored="true" /> I start solr with java -jar start.jar . But when I try to add a document with a geom field I get an exception: Caused by:

How can you retrieve a full nested document in Solr?

蓝咒 提交于 2019-12-23 21:13:23
问题 In my instance of Solr 4.10.3 I would like to index JSONs with a nested structure. Example: { "id": "myDoc", "title": "myTitle" "nestedDoc": { "name": "test name" "nestedAttribute": { "attr1": "attr1Val" } } } I am able to store it correctly through the admin interface: /solr/#/mySchema/documents and I'm also able to search and retrieve the document. The problem I'm facing is that when I get the response document from my Solr search, I cannot see the nested attributes. I only see: { "id":