solr

How can I manipulate the multicore in solr dynamically

梦想的初衷 提交于 2019-12-13 01:14:02
问题 I am new to apache solr. I want to manipulate the multicore dynamically using CoreAdminHandler class of org.apache.solr.handler.admin.CoreAdminHandler; There are no tutorials on how to use it nor any good example I could google out. Please give me some example of how can I manipulate multicore which are deployed in tomcat(not embedded) using CoreAdminHandler and solrj. How can I specify the path of my tomcat server where solr is deployed for CoreAdminHandler/coreContainer. And how to specify

How to index html content, keeping positions (as xpath, css selector, etc)

╄→гoц情女王★ 提交于 2019-12-13 01:13:59
问题 I want to create a full-text search index for HTML content (to be more specific: EPUB chapters in XHTML format). Like this: ... <p>Lorem ipsum <b>dolor</b> sit amet, consectetur adipiscing elit.</p> ... The problem is that I need somehow the matched text's position (like xpath) with search results, because i need to position the reader software to the right place. I need a functionality like highlight feature, but instead of highlighted text, give the where-to-highlight position of matches.

solr response in xml format

a 夏天 提交于 2019-12-13 01:04:13
问题 I am trying to query Solr using certain fields and I want the response in XML format. Somehow I am not able to get the response in XML format even though I have set the parser to XMLResponseParser . Please check the code and let me know what is wrong in here: HttpSolrServer solr = new HttpSolrServer(urlString); String queryString ="*:*"; SolrQuery query = new SolrQuery(queryString); query.setQuery(queryString); query.setFields("type", "typestring"); query.addFilterQuery("id"); query.setStart

Search across multiple cores and get unified result

♀尐吖头ヾ 提交于 2019-12-13 01:03:47
问题 I have 2 cores on a single solr instance. Schema's of both cores share same primary key. I want to merge results of a query from both the cores. Is it possible using solr? I followed Solr:Distributed Search however the example didnt work for me ( I did get result but it was not unified) . I queried solr cores using : localhost:8983/solr/core1/select/?shards=localhost:8983/solr/core1,localhost:8983/solr/core0&q=123_456. Has anyone tried this approach before? 回答1: What do you mean by Unified

Adding a multivalued, commas separated String to Solr isn't working

倖福魔咒の 提交于 2019-12-13 00:38:12
问题 I am trying to add a multivalued content to Solr index. The original String contains values seperated by ",". <fieldtype name="commas_type" class="solr.TextField" omitNorms="true"> <analyzer type="index"> <tokenizer class="solr.PatternTokenizerFactory" pattern=",\s*"/> <filter class="solr.LowerCaseFilterFactory" /> </analyzer> <analyzer type="query"> <tokenizer class="solr.PatternTokenizerFactory" pattern=",\s*"/> <filter class="solr.LowerCaseFilterFactory" /> </analyzer> </fieldtype> <field

what is SOLR multicore exactly

混江龙づ霸主 提交于 2019-12-13 00:36:31
问题 In SOLR, what is multicore? Is it a way to create multiple tables (inside a single solr app) with their own set of schema files, or is it about creating different databases (inside a single solr app)? If we want to create multiple tables (with their respective schema.xml files) for solr web app then what is the best way to do this, or how can we achieve this in SOLR? 回答1: Solr Multicore is basically a set up for allowing Solr to host multiple cores. These Cores which would host a complete

Boost SolR results using users behavior

拈花ヽ惹草 提交于 2019-12-13 00:10:44
问题 I would like SolR to be able to "learn" from my website users' choices. By that i mean that i know which product the user click after he performed a search. So i collected a list of [term searched => number of clicks] for each product indexed in SolR. But i can't figure how to have a boost that depends on the user input. Is it possible to index some key/value pairs for a document and retrieve the value with a function usable in the boost parameter ? I'm not sure to be clear, so i'll add a

Adding log4j.properties to war file (in Solr application)

醉酒当歌 提交于 2019-12-13 00:02:27
问题 I have a problem with logging in Solr. I want it not to write everything on standard output (I mean glassfish server.log). I want it to use log4j and to write its messages to separate file. I've created log4j.xml file but I don't know if I can add it to the .war file. I've tried external log4j.xml file and setting JVM option -Dlog4j.configuration=file:/{path_to_file} and it worked but only partially. I have some other applications installed on glassfish and all of them started to write to

How to enforce an exact match to get the highest priority?

筅森魡賤 提交于 2019-12-13 00:01:25
问题 I am indexing and searching 5 fields, which are tokenized/filtered in various ways. BUT, I would like that when I search, if the query I entered matches a value in field 1, it will be the top result I get back. How would I define: The field The query in such a way this field gets priority IF there is 100% match In my schema, I have the field <field name="na_title" type="text_names" indexed="true" stored="false" required="true" /> text_names is : <fieldType name="text_names" class="solr

Difficulty setting Solr JVM memory settings on Ubuntu with Bitnami AMI

时间秒杀一切 提交于 2019-12-12 23:51:18
问题 I am using the Apache Solr powered by BitNami EC2 AMI. Solr is running, but I'd like to change the startup configuration to increase the amount of memory allocated to JVM. I have tried modifying the startup script at at /opt/bitnami/apache-solr/scripts/ctl.sh by modifying the following line: SOLR="$JAVABIN -Dsolr.solr.home=$SOLR_HOME -Djetty.logs=$INSTALL_PATH/logs/ -Djetty.home=$INSTALL_PATH/ -jar $INSTALL_PATH/start.jar $INSTALL_PATH/etc/jetty.xml" I've tried different permutations for the