Re: how to check index's data
I find solrphp is problem. i use post.sh,,it can index data and i can use luke
tomcat install
tomcat 5.5 win2003,,i can find http://localhost:8080,,it is ok. i copy solr-nightly.war to "c:\tomcat5.5\webapps\solr.war" i start tomcat,,it auto generate solr directory in "c:\tomcat5.5\webapps\solr" http://localhost:8080/solr/admin/,,,it show me error information: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Exception in JSP: /admin/_info.jsp:8 5: 6: <%@ page import="java.util.Date" %> 7: 8: 9: 10: <[EMAIL PROTECTED] file="header.jsp" %> 11: and i don't know where i should put example/solr if i wanna add lucene-analyzers-2.0.0.jar,,,where i put it? thks.
Re: acts_as_solr
I had a play around with acts_as_solr today (thanks Yonik for the pointer). Had to fiddle around for a while to set up the schema.xml, (I'm totally new to Solr), but it worked well. Well, I'm far from RoR savvy (new to Ruby/Rails also), but concerning the commit question, probably using an around_filter to extend the transaction scope would be best. That way, migrations, script/ console, & other ways to directly use model will still work using auto-commit. I'll have a stab to keep the ball rolling. Add filter in from from plugin: ActionController::Base.around_filter SolrFilter.new With something like this pseudocode: class SolrFilter def before disable solr commit for request end def after solr commit end end (and check if commit needed within save callback of course) Anyway, acts_as_solr is looking good, thanks! Simon >>> I think Ruby is very fertile ground for Solr to pick up users/developers right now. I fully agree. Ferret is coming along very nicely as well, which is wonderful for pure Rubyists that don't need the additional dependency, skill set to manage, and different environment that Solr would require. But Solr really shines for all its caching and index management, so I'm sure there will be many RoR folks that will embrace Solr. Getting into some little details, it looks like a commit (which actualy does an optimize) is done on every .save, right? That's true. I'm not sure how one would avoid doing a commit for a .save. There isn't, as far as I know, broader granularity for database operations. An optimize wouldn't be necessary, but certainly swapping over the searcher would be desired after a save. I also notice that the commit is asynchronous... so one could do a save, then do an immediate search and not see the changes yet, right? That is true. But holding up a save for a new IndexSearcher would be a big hit, at least in my application that currently takes 30+ seconds of warming up before a new searcher is ready. I don't know anything about RoR and ActiveRecord, but hopefully there is some way to avoid a commit on every operation. It could certainly be made more manual such that a developer would need to code in when a commit happens. I'm not currently sure what other options there would be for it to be automatic but not done for every .save. Within a RoR application, one could code in a a controller after_filter such that it would occur at the end of an HTTP request by the browser. Any RoR savvy folks have suggestions on this? Erik
Re: tomcat install
Hi James, you should put the directory solr (which you find under /example/solr) directly under c:\tomcat5.5\, so you get c:\tomcat5.5\solr\bin en c:\tomcat5.5\solr\conf . The error you are getting is that tomcat cann't find the solr configuration directory. Hope you get it running. Kind regards, Nick On 9/17/06, James liu <[EMAIL PROTECTED]> wrote: tomcat 5.5 win2003,,i can find http://localhost:8080,,it is ok. i copy solr-nightly.war to "c:\tomcat5.5\webapps\solr.war" i start tomcat,,it auto generate solr directory in "c:\tomcat5.5\webapps\solr" http://localhost:8080/solr/admin/,,,it show me error information: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Exception in JSP: /admin/_info.jsp:8 5: 6: <%@ page import="java.util.Date" %> 7: 8: 9: 10: <[EMAIL PROTECTED] file="header.jsp" %> 11: and i don't know where i should put example/solr if i wanna add lucene-analyzers-2.0.0.jar,,,where i put it? thks.
Re: how to check index's data
: I find solrphp is problem. : : i use post.sh£¬£¬it can index data and i can use luke post.sh does a commit automatically after sending docs, i don't know much about PHP but doing a quick grep of http://wiki.apache.org/solr/SolrUpdate i don't see anywhere in the addIndex method you mentioned that it does a commit ... i tink you are expected to call the sendCommit function yourself. A quick way to check if any docs have been added to your index is to look at the statistics page... http://localhost:8983/solr/admin/stats.jsp ...if any documents have ever been added you should see a non-zero value for "maxDocs" in the "CORE" section ... if there are currently some non-deleted docs you should see a non-zero value for "numDocs" as well. the other important section to look at is the "UPDATE HANDLERS" section ... if that "commits" count is 0 then your client code has never sent a commit - the docsPending and deletesPending numbers will tell you how many commands it has recieved that it hasn't done yet because it's waiting for a commit. -Hoss
Re: tomcat install
thk Nick. i do you tell me and i can see admin page. but when i click search ,,,error information: java.lang.NullPointerException at org.apache.solr.search.SolrQueryParser.(SolrQueryParser.java:37) at org.apache.solr.search.QueryParsing.parseQuery(QueryParsing.java:47) at org.apache.solr.request.StandardRequestHandler.handleRequest( StandardRequestHandler.java:94) at org.apache.solr.core.SolrCore.execute(SolrCore.java:586) at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java:91) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java :148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) it seems i should do something.. 2006/9/18, Nick Snels <[EMAIL PROTECTED]>: Hi James, you should put the directory solr (which you find under /example/solr) directly under c:\tomcat5.5\, so you get c:\tomcat5.5\solr\bin en c:\tomcat5.5\solr\conf . The error you are getting is that tomcat cann't find the solr configuration directory. Hope you get it running. Kind regards, Nick On 9/17/06, James liu <[EMAIL PROTECTED]> wrote: > > tomcat 5.5 win2003,,i can find http://localhost:8080,,it is ok. > > i copy solr-nightly.war to "c:\tomcat5.5\webapps\solr.war" > > i start tomcat,,it auto generate solr directory in > "c:\tomcat5.5\webapps\solr" > > http://localhost:8080/solr/admin/,,,it show me error information: > > HTTP Status 500 - > > type Exception report > > message > > description The server encountered an internal error () that prevented it > from fulfilling this request. > > exception > org.apache.jasper.JasperException: Exception in JSP: /admin/_info.jsp:8 > > 5: > 6: <%@ page import="java.util.Date" %> > 7: > 8: > 9: > 10: <[EMAIL PROTECTED] file="header.jsp" %> > 11: > > > and i don't know where i should put example/solr > > > if i wanna add lucene-analyzers-2.0.0.jar,,,where i put it? > > > thks. > >