Solr result xml related query
Hi, I wanted some inputs on the solr result xml. Currently the result obtained will be of the format doc str attrName1=attrValue1attrResult1/str str attrName2=attrValue2attrResult2/str /doc Is it possible some how to change it to the form doc attrValue1attrResult1/attrValue attrValue2attrResult2/attrValue /doc The reason why I am asking this is to reduce the amount of logic required to parse the xml and get the required data.Currently I am facing performance issues because of this. Please provide your inputs for the same. Please inform if there are any alternatives. Regards, Rinesh -- View this message in context: http://www.nabble.com/Solr-result-xml-related-query-tp21126465p21126465.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr result xml related query
Hi Shalin, Yes I am using java. I am using solr 1.2 ..As per my knowledge solrJ is not compatible wilt solr 1.2. Regards, Rinesh Shalin Shekhar Mangar wrote: On Mon, Dec 22, 2008 at 5:10 PM, Rinesh1 rinesh_ku...@infosys.com wrote: Hi, I wanted some inputs on the solr result xml. Currently the result obtained will be of the format doc str attrName1=attrValue1attrResult1/str str attrName2=attrValue2attrResult2/str /doc Is it possible some how to change it to the form doc attrValue1attrResult1/attrValue attrValue2attrResult2/attrValue /doc The reason why I am asking this is to reduce the amount of logic required to parse the xml and get the required data.Currently I am facing performance issues because of this. Are you using Java? Have you looked at SolrJ client? http://wiki.apache.org/solr/Solrj -- Regards, Shalin Shekhar Mangar. -- View this message in context: http://www.nabble.com/Solr-result-xml-related-query-tp21126465p21127506.html Sent from the Solr - User mailing list archive at Nabble.com.
Details on logging in Solr
Hi, I was trying to do a performance test on Solr web application. If I run the performance tests, lot og logging is happening due to which I am getting log files in GBs Is there any clean way of deactivating logging or changing the log level to say error .. Is there any property file for the same. Please give your inputs for the same. Regards, Rinesh. -- View this message in context: http://www.nabble.com/Details-on-logging-in-Solr-tp21027267p21027267.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Details on logging in Solr
Hi Ryan, Thanks for the inputs .These are the set of steps followed to solve this issue. 1.make a loggging property file say solrLogging.properties.We can copy the default logging property file available at JAVA_HOME/jre/lib folder. default java logging file will look like the following. # Default Logging Configuration File # # You can use a different file by specifying a filename # with the java.util.logging.config.file system property. # For example java -Djava.util.logging.config.file=myfile # Global properties # handlers specifies a comma separated list of log Handler # classes. These handlers will be installed during VM startup. # Note that these classes must be on the system classpath. # By default we only configure a ConsoleHandler, which will only # show messages at the INFO and above levels. handlers= java.util.logging.ConsoleHandler # To also add the FileHandler, use the following line instead. #handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler # Default global logging level. # This specifies which kinds of events are logged across # all loggers. For any given facility this global level # can be overriden by a facility specific level # Note that the ConsoleHandler also has a separate level # setting to limit messages printed to the console. .level= INFO # Handler specific properties. # Describes specific configuration info for Handlers. # default file output is in user's home directory. java.util.logging.FileHandler.pattern = %h/java%u.log java.util.logging.FileHandler.limit = 5 java.util.logging.FileHandler.count = 1 java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter # Limit the message that are printed on the console to INFO and above. java.util.logging.ConsoleHandler.level = INFO java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter # Facility specific properties. # Provides extra control for each logger. # For example, set the com.xyz.foo logger to only log SEVERE # messages: com.xyz.foo.level = SEVERE To prevent INFO level messages change java.util.logging.ConsoleHandler.level = INFO to java.util.logging.ConsoleHandler.level = SEVERE 2.While starting the server for Ex. Jboss add the following line to the run.bat or run.sh set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.config.file=Y:\solrLog.properties This will solve the issue Regards, Rinesh. ryantxu wrote: solr 1.3 uses java logging. Most app containers (tomcat, resin, etc) give you a way to configure that. Also check: http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html#1.8 You can make runtime changes from the /admin/ logging tab. However, these changes are not persisted when the app restarts. On Dec 15, 2008, at 11:52 PM, Rinesh1 wrote: Hi, I was trying to do a performance test on Solr web application. If I run the performance tests, lot og logging is happening due to which I am getting log files in GBs Is there any clean way of deactivating logging or changing the log level to say error .. Is there any property file for the same. Please give your inputs for the same. Regards, Rinesh. -- View this message in context: http://www.nabble.com/Details-on-logging-in-Solr-tp21027267p21027267.html Sent from the Solr - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Details-on-logging-in-Solr-tp21027267p21027540.html Sent from the Solr - User mailing list archive at Nabble.com.
Solr Locking Issue
Hi, Please help me with the following scenario. I have a solr data folder SOLR_DATA I have 2 web applications solr1 and solr 2 referring to the same SOLR_DATA folder. I am trying to index data using solr1/update and solr2/update sequentially. Indexing using the first web app happens fine. But when I try using the second web app, I am getting the following error SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: [EMAIL PROTECTED]:\apache-solr-1.2.0\example\solr\data\index\writ e.lock at org.apache.lucene.store.Lock.obtain(Lock.java:70) at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:579) at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:341) at org.apache.solr.update.SolrIndexWriter.init(SolrIndexWriter.java:65) at org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:120) at org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:181) at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:259) at org.apache.solr.handler.XmlUpdateRequestHandler.update(XmlUpdateRequestHandler.java:166) at org.apache.solr.handler.XmlUpdateRequestHandler.handleRequestBody(XmlUpdateRequestHandler.java:84) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77) at org.apache.solr.core.SolrCore.execute(SolrCore.java:658) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:191) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:159) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) Looks like there is some locking happening . How can I unlock it.Is it because I have not committed the data after indexing from the first web application. This was mainly to test whether N web applications can share same SOLR_DATA folder. Please provide your inputs . Thanks in advance, Rinesh Kumar. -- View this message in context: http://www.nabble.com/Solr-Locking-Issue-tp20868016p20868016.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr Locking Issue
Hi Grant, Q.Why do you need two web apps pointing to the same Solr data directory? A.I am planning to deploy solr in a load balanced environment where there will be 3 web servers and 3 app servers.So there will be solr web app deployed in 3 app servers and there will be 1 SOLR_DATA folder shared in the storage area network for all 3 solr web apps to search.Similarly we will have appX running on 3 app servers which can indexing data to the same repository using the respective solr web app.I am trying to share the same SOLR_DATA folder for simplifying maintainance. Q.Why can't your two webapps share a single Solr instance? A.As I understand you are asking why applications using solr cannot index data to the same solr instance.Reason being failure of one of the app server should not lead to failure of the platform or I can say to take all the advantages of load balancing. Please inform if this is the right way of deployment or there is other better alternative. Regards, Rinesh. Grant Ingersoll-6 wrote: In Lucene (hence Solr) only one IndexWriter may write to an index at a time (by design), so pointing two separate Solr instances at the same index will result in the lock issue you describe. I guess the question back to you is, why do you need two web apps pointing to the same Solr data directory? Why can't your two webapps share a single Solr instance? On Dec 6, 2008, at 5:45 AM, Rinesh1 wrote: Hi, Just adding some additional steps I have tried. I have tried the following scenarios for testing this. FIRST 1.Index 5000 docs to solr using the FIRST web app 2.send a commit command from the SECOND web app 3.Tried indexing docs from the SECOND web app. LOCKING ISSUE EXISTS SECOND 1.Index 5000 docs to solr using the FIRST web app 2.send a commit command from the FIRST web app 3.Tried indexing docs from the SECOND web app. THERE IS NO LOCKING ISSUE NOW Is commiting the only solution .Is there any other solution Regards, Rinesh Rinesh1 wrote: Hi, Please help me with the following scenario. I have a solr data folder SOLR_DATA I have 2 web applications solr1 and solr 2 referring to the same SOLR_DATA folder. I am trying to index data using solr1/update and solr2/update sequentially. Indexing using the first web app happens fine. But when I try using the second web app, I am getting the following error SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: [EMAIL PROTECTED]:\apache-solr-1.2.0\example\solr\data\index \writ e.lock at org.apache.lucene.store.Lock.obtain(Lock.java:70) at org.apache.lucene.index.IndexWriter.init(IndexWriter.java: 579) at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:341) at org.apache.solr.update.SolrIndexWriter.init(SolrIndexWriter.java: 65) at org .apache .solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java: 120) at org .apache .solr .update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java: 181) at org .apache .solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java: 259) at org .apache .solr .handler .XmlUpdateRequestHandler.update(XmlUpdateRequestHandler.java:166) at org .apache .solr .handler .XmlUpdateRequestHandler .handleRequestBody(XmlUpdateRequestHandler.java:84) at org .apache .solr .handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77) at org.apache.solr.core.SolrCore.execute(SolrCore.java:658) at org .apache .solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:191) at org .apache .solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java: 159) at org .apache .catalina .core .ApplicationFilterChain .internalDoFilter(ApplicationFilterChain.java:235) at org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 206) at org .jboss .web .tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org .apache .catalina .core .ApplicationFilterChain .internalDoFilter(ApplicationFilterChain.java:235) at org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 206) at org .apache .catalina .core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org .apache .catalina .core.StandardContextValve.invoke(StandardContextValve.java:175) at org .jboss .web .tomcat .security .SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org .jboss .web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java: 84) at org .apache .catalina.core.StandardHostValve.invoke