EmbeddedSolrServer No such core: collection1
Hi, I'm using EmbeddedSolrServer for testing the solr. I went step by step in this instuctions (for solr 4) https://wiki.searchtechnologies.com/index.php/Unit_Testing_with_Embedded_Solr I can see that the config loaded, but when I try to put document, the error I get is: org.apache.solr.common.SolrException: No such core: collection1 I'm sure it's something in the solr.xml, but I couldn't find the issue, Any thought? in the solr.xml I have: ${host:} ${jetty.port:8983} ${hostContext:solr} ${zkClientTimeout:3} ${genericCoreNodeNames:true} ${socketTimeout:0} ${connTimeout:0} Thanks, Shani - Intel Electronics Ltd. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Re: EmbeddedSolrServer No such core: collection1
Hi Shani, What version of Solr are you using? The instructions you quote look like they are for something like <4.4 from what you have written below. The below is cloned from one of my projects, and hacked without testing, but I hope it gives you the idea of how it can be done. public SolrServer getEmbeddedServer(String solrHome, String solrConfigurationPath, String myCore) { // Create solr_home directory with solr.xml new File(solrHome).mkdirs(); FileUtils.copyFile(new File(config.getSolrXmlPath()), new File(solrHome, "solr.xml")); // Create config dir for my new core File myCoreConfig = new File(solrHome + "/" + myCore + "/conf"); myCoreConfig.mkdirs(); FileUtils.copyDirectory(new File(solrConfigurationPath), myCoreConfig); // Create core.properties file FileUtils.write(new File(core, "core.properties"), "name=" + coreName); // Create CoreContainer and EmbeddedSolrServer File solrXml = new File(solrHome, "solr.xml"); CoreContainer coreContainer = CoreContainer.createAndLoad(solrHome, solrXml); EmbeddedSolrServer newServer = new EmbeddedSolrServer(coreContainer, myCore); } Upayavira On Sun, Jul 5, 2015, at 01:17 PM, Chaushu, Shani wrote: > Hi, > I'm using EmbeddedSolrServer for testing the solr. > I went step by step in this instuctions (for solr 4) > https://wiki.searchtechnologies.com/index.php/Unit_Testing_with_Embedded_Solr > I can see that the config loaded, but when I try to put document, the > error I get is: > org.apache.solr.common.SolrException: No such core: collection1 > > I'm sure it's something in the solr.xml, but I couldn't find the issue, > Any thought? > > in the solr.xml I have: > > > > ${host:} > ${jetty.port:8983} > ${hostContext:solr} > ${zkClientTimeout:3} > name="genericCoreNodeNames">${genericCoreNodeNames:true} > > > > > > > > > > class="HttpShardHandlerFactory"> > ${socketTimeout:0} > ${connTimeout:0} > > > > > Thanks, > Shani > > > - > Intel Electronics Ltd. > > This e-mail and any attachments may contain confidential material for > the sole use of the intended recipient(s). Any review or distribution > by others is strictly prohibited. If you are not the intended > recipient, please contact the sender and delete all copies.
Display pattern of child entity records as row
Team, I have a requirement like getting the list of the child tables along with parent records as the below pattern. "id":"0BICA_PROBLEM_AUTHOR", "description_txt":[""], "display_value_txt":["Analyser : Problems/Category/Author"], "report_types_id_txt":["1"], "report_categories_id_txt":["30585"], "category_name_txt":["0RS_RPODS"], icon_url_txt":["images/icon_report_crystal.png"] "detail_txt":[{"IOBJNM": "0RS_AUTHOR","TXTLG":"Author","IOBJTP":"CHA"}, {"IOBJNM": "0RS_CCAT","TXTLG":" CheckCategory (inte","IOBJTP":" CHA"}, {"IOBJNM": "0RS_PRIORTY","TXTLG":"Priority CHA","IOBJTP":""}, {"IOBJNM": "PRIOSEL","TXTLG":"Priority Selection","IOBJTP":"KFG""}] } >From the above detail_txt child entity ( Child Table). With the current and default implementation, I am getting the response as below. { "data_source_txt":["0RS_RPOD"], "id":"0BICA_PROBLEM_AUTHOR", "description_txt":[""], "display_value_txt":["Analyser : Problems/Category/Author"], "report_types_id_txt":["1"], "report_categories_id_txt":["30585"], "category_name_txt":["0RS_RPODS"], "icon_url_txt":["images/icon_report_crystal.png"], "report_type_display_value_txt":["Bex"], "iobjtp_txt":["CHA", "CHA", "CHA", "KFG"], "txtlg_txt":["Author", "CheckCategory (inte", "Priority", "Priority Selection"], "iobjnm_txt":["0RS_AUTHOR", "0RS_CCAT", "0RS_PRIORTY", "PRIOSEL"], "_version_":1505820339930660864} As seen above I am getting the array of columns for each of fields instead of each row in the entity as a block. Please provide your suggestions on this. I am using latest version of solr APACHE SOLR™ 5.2.1 Please provide your suggestion to meet the requirement. -Shankar
LFU vs solr.FastLRUCache
Has anyone used solr.LFUCache in Production to replace: Thoughts? -- Bill Bell billnb...@gmail.com cell 720-256-8076
Problems with loading core when starting Solr 5.2.1
Hi, I've just migrated to Solr 5.2.1 with external ZooKeeper 3.4.6. Whenever I tried to start Solr using these command, the Solr servers gets started, but none of the cores is actually loaded. - bin\solr.cmd start -cloud -z localhost:2181 - bin\solr.cmd -cloud -p 8983 -s server\solr -z localhost:2181 I can only get the core to be loaded when I use the following command - bin\solr.cmd -e cloud -z localhost:2181 However, this command is actually the step by step guide to create a new collection, and I don't have to create a new collection each time I start Solr. Is there anything wrong with my first two commands? Regards, Edwin
Re: Problems with loading core when starting Solr 5.2.1
Use bin/solr create to make a new collection. Upayavira On Mon, Jul 6, 2015, at 05:17 AM, Zheng Lin Edwin Yeo wrote: > Hi, > > I've just migrated to Solr 5.2.1 with external ZooKeeper 3.4.6. > > Whenever I tried to start Solr using these command, the Solr servers gets > started, but none of the cores is actually loaded. > - bin\solr.cmd start -cloud -z localhost:2181 > - bin\solr.cmd -cloud -p 8983 -s server\solr -z localhost:2181 > > I can only get the core to be loaded when I use the following command > - bin\solr.cmd -e cloud -z localhost:2181 > > However, this command is actually the step by step guide to create a new > collection, and I don't have to create a new collection each time I start > Solr. > > Is there anything wrong with my first two commands? > > Regards, > Edwin
Re: Display pattern of child entity records as row
It looks like you are indexing the detail_txt fields as multivalued. Perhaps you could index them as parent/child documents, and use block joins and the expand component to retrieve them. You can index the doc as: 0BICA_PROBLEM_AUTHOR parent ... 0RS_AUTHOR Author CHA child ... If you want to query the parent docs, just query as normal, and add expand=true to see your child docs in your results (lower down). Or, use the {!parent} or {!child} queries to select documents based upon parent/child relationships. Upayavira On Mon, Jul 6, 2015, at 04:41 AM, SHANKAR REDDY wrote: > Team, > I have a requirement like getting the list of the child tables along > with > parent records as the below pattern. > > "id":"0BICA_PROBLEM_AUTHOR", > "description_txt":[""], > "display_value_txt":["Analyser : Problems/Category/Author"], > "report_types_id_txt":["1"], > "report_categories_id_txt":["30585"], > "category_name_txt":["0RS_RPODS"], > icon_url_txt":["images/icon_report_crystal.png"] > "detail_txt":[{"IOBJNM": "0RS_AUTHOR","TXTLG":"Author","IOBJTP":"CHA"}, > {"IOBJNM": "0RS_CCAT","TXTLG":" CheckCategory (inte","IOBJTP":" CHA"}, > {"IOBJNM": "0RS_PRIORTY","TXTLG":"Priority CHA","IOBJTP":""}, > {"IOBJNM": "PRIOSEL","TXTLG":"Priority Selection","IOBJTP":"KFG""}] > } > > From the above detail_txt child entity ( Child Table). With the current > and > default implementation, I am getting the response as below. > > > { > "data_source_txt":["0RS_RPOD"], > "id":"0BICA_PROBLEM_AUTHOR", > "description_txt":[""], > "display_value_txt":["Analyser : Problems/Category/Author"], > "report_types_id_txt":["1"], > "report_categories_id_txt":["30585"], > "category_name_txt":["0RS_RPODS"], > "icon_url_txt":["images/icon_report_crystal.png"], > "report_type_display_value_txt":["Bex"], > "iobjtp_txt":["CHA", > "CHA", > "CHA", > "KFG"], > "txtlg_txt":["Author", > "CheckCategory (inte", > "Priority", > "Priority Selection"], > "iobjnm_txt":["0RS_AUTHOR", > "0RS_CCAT", > "0RS_PRIORTY", > "PRIOSEL"], > "_version_":1505820339930660864} > > As seen above I am getting the array of columns for each of fields > instead > of each row in the entity as a block. > Please provide your suggestions on this. I am using latest version of > solr > APACHE SOLR™ 5.2.1 > > Please provide your suggestion to meet the requirement. > > -Shankar
Re: Tokenizer and Filter Factory to index Chinese characters
I'm now using the solr.ICUTokenizerFactory, and the searching for Chinese characters can work when I use the Query tab in Solr Admin UI. In the Admin UI, it converts the Chinese characters to code before passing it to the URL, so it looks something like this: http://localhost:8983/solr/chinese2/select?q=%E8%83%A1%E5%A7%AC%E8%8A%B1&wt=json&indent=true&hl=true "highlighting":{ "chinese5":{ "text":["园将办系列活动庆祝入遗 \n 从胡姬花展到音 乐会,为庆祝申遗成功,植物园这个月起将举办一系列活动与公众一同庆贺。 本月10日开始的“新加坡植物园胡姬及其文化遗产”展览,将展出1万 6000株胡姬花,这是"]}, "chinese3":{ "text":[" \n 原版为 马来语 《Majulah Singapura》,中文译为《 前 进吧,新加坡 》。 \n \n \t 国花 \n 新加坡以一种名为 卓 锦 · 万代 兰 的胡姬花为国花。东南亚通称兰花为胡姬花"]}}} However, if I enter the Chinese characters directly into the URL, the results I get are wrong. http://localhost:8983/solr/chinese2/select?q=胡姬花&hl=true&hl.fl=text "highlighting":{ "chinese1":{ "text":["1月份的制造业产值同比仅增长0 \n \n 新加坡 我国1月份的制造业产值同比仅增长0.9%。 虽然制造业结束连续两个月的萎缩,但比经济师普遍预估的增长3.3%疲软得多。这也意味着,我国今年第一季度的经济很可能让人失望 \n "]}, "chinese2":{ "text":["Zheng Lin Yeo"]}, "chinese3":{ "text":["Zheng Lin Yeo"]}, "chinese4":{ "text":["户只要订购《联合晚报》任一种配套,就可选择下列其中一项赠品带回家。 \n 签订两年配套的读者可获得一台价值 199元的Lenovo TAB 2 A7-10七寸平板电脑,或者一架价值249元的Philips Viva"]}, "chinese5":{ "text":["Zheng Lin Yeo"]}}} Why is this so? Regards, Edwin 2015-06-25 18:54 GMT+08:00 Markus Jelsma : > You may also want to try Paoding if you have enough time to spend: > https://github.com/cslinmiso/paoding-analysis > > -Original message- > > From:Zheng Lin Edwin Yeo > > Sent: Thursday 25th June 2015 11:38 > > To: solr-user@lucene.apache.org > > Subject: Re: Tokenizer and Filter Factory to index Chinese characters > > > > Hi, The result doesn't seems that good as well. But you're not using the > > HMMChineseTokenizerFactory? > > > > The output below is from the filters you've shown me. > > > > "highlighting":{ > > "chinese1":{ > > "id":["chinese1"], > > "title":["我国1月份的制造业产值同比仅增长0"], > > > > "content":[",但比经济师普遍预估的增长3.3%疲软得多。这也意味着,我国今年第一季度的经济很可能让人失望 > > \n "], > > "author":["Edwin"]}, > > "chinese2":{ > > "id":["chinese2"], > > "content":["铜牌,让我国暂时高居奖牌荣誉榜榜首。 > > 你看好新加坡在本届的东运会中,会夺得多少面金牌? > > 请在6月12日中午前,投票并留言为我国健将寄上祝语吧 \n > > "], > > "author":["Edwin"]}, > > "chinese3":{ > > "id":["chinese3"], > > "content":[")组成的我国女队在今天的东运会保龄球女子三人赛中, > > > 以六局3963总瓶分夺冠,为新加坡赢得本届赛会第三枚金牌。队友陈诗桦(Jazreel)、梁蕙芬和陈诗静以3707总瓶分获得亚军,季军归菲律宾女队。(联合早报记者:郭嘉惠) > > \n "], > > "author":["Edwin"]}, > > "chinese4":{ > > "id":["chinese4"], > > "content":[",则可获得一架价值309元的Philips Viva > > Collection HD9045面包机。 \n > > 欲订从速,读者可登陆www.wbsub.com.sg,或拨打客服专线6319 > > 1800订购。 \n > > > 此外,一年一度的晚报保健美容展,将在本月23日和24日,在新达新加坡会展中心401、402展厅举行。 > > \n > 现场将开设《联合晚报》订阅展摊,读者当场订阅晚报,除了可获得丰厚的赠品,还有机会参与“必胜”幸运抽奖"], > > "author":["Edwin"]}}} > > > > > > Regards, > > Edwin > > > > > > 2015-06-25 17:28 GMT+08:00 Markus Jelsma : > > > > > Hi - we are actually using some other filters for Chinese, although > they > > > are not specialized for Chinese: > > > > > > > > > > > > > > > > > > > > > > > > -Original message- > > > > From:Zheng Lin Edwin Yeo > > > > Sent: Thursday 25th June 2015 11:24 > > > > To: solr-user@lucene.apache.org > > > > Subject: Re: Tokenizer and Filter Factory to index Chinese characters > > > > > > > > Thank you. > > > > > > > > I've tried that, but when I do a search, it's returning much more > > > > highlighted results that what it supposed to. > > > > > > > > For example, if I enter the following query: > > > > http://localhost:8983/solr/chinese1/highlight?q=我国 > > > > > > > > I get the following results: > > > > > > > > "highlighting":{ > > > > "chinese1":{ > > > > "id":["chinese1"], > > > > > > > > "title":["我国1月份的制造业产值同比仅增长0"], > > > > > > > > "content":["结束连续两个月的萎缩,但比经济师普遍预估的增长3.3%疲软得多。这也意味着,我国今年第一季度的经济很可能让人失望 > > > > \n "], > > > > "author":["Edwin"]}, > > > > "chinese2":{ > > > > "id":["chinese2"], > > > > > > > > "content":["铜牌,让我国暂时高居奖牌荣誉榜榜首。 > > > > 你看好新加坡在本届的东运会中,会夺得多少面金牌? > > > > > > > > 请在6月12日中午前,投票并留言为我国健将寄上祝语吧 > > > > \n "], > > > > "author":["Edwin"]}, > > > > "chinese3":{ > > > > "id":["chinese3"], > > > > > > > > "content":[")组成的我国女队在今天的东运会保龄球女子三人赛中, > > > > > > > > 以六局3963总瓶分夺冠,为新加坡赢得本届赛会第三枚金牌。队友陈诗桦(Jazreel)、梁蕙芬和陈诗静以3707总瓶分获得亚军,季军归菲律宾女队。(联合早报记者:郭嘉惠) > > > > \n "], > > > > "author":[" > > > "chinese4":{ > > > > "id":["chinese4"], > > > > > > > > "content":["配套的读者,则可获得一架价值309元的Philips > > > > Viva Collection HD9045面包机。 \n > > > > 欲订从速,读者可登陆www.wbsub.com > > > .sg,或拨打客服专线6319 > > > > 1800订购。 \n > > > > > > > > 此外,一年一度的晚报保健美容展,将在本月23日和24日,在新达新加坡会展中心401、402展厅举行。 > > > > \n > > > > 现场将开设《联合晚报》订阅展摊,读者当场订阅晚报,除了可获得丰厚的赠品,还有机会参与“"], > > > > "author":["Edwin"]}}} > > > > > > > > > > > > Is there any suitable filter factory to solve this issue? > > > > > > > > I've