lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Briggs Thompson <w.briggs.thomp...@gmail.com>
Subject Solr 4 Alpha SolrJ Indexing Issue
Date Wed, 18 Jul 2012 17:54:51 GMT
Hello All,

I am using 4.0 Alpha and running into an issue with indexing using
HttpSolrServer (SolrJ).

Relevant java code:
            HttpSolrServer solrServer = new HttpSolrServer(MY_SERVER);
            solrServer.setRequestWriter(new BinaryRequestWriter());

Relevant Solrconfig.xml content:

  <requestHandler name="/update" class="solr.UpdateRequestHandler"  />

  <requestHandler name="/update/javabin"
class="solr.BinaryUpdateRequestHandler" />

Indexing documents works perfectly fine (using addBeans()), however, when
trying to do deletes I am seeing issues. I tried to do
a solrServer.deleteByQuery("*:*") followed by a commit and optimize, and
nothing is deleted.

The response from delete request is a "success", and even in the solr logs
I see the following:

INFO: [coupon] webapp=/solr path=/update/javabin
params={wt=javabin&version=2} {deleteByQuery=*:*} 0 1
Jul 18, 2012 11:15:34 AM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: start
commit{flags=0,version=0,optimize=true,openSearcher=true,waitSearcher=false,expungeDeletes=false,softCommit=false}



I tried removing the binaryRequestWriter and have the request send out in
default format, and I get the following error.

SEVERE: org.apache.solr.common.SolrException: Unsupported ContentType:
application/octet-stream  Not in: [application/xml, text/csv, text/json,
application/csv, application/javabin, text/xml, application/json]

at
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:86)
at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1561)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)


I thought that an optimize does the same thing as expungeDeletes, but in
the log I see expungeDeletes=false. Is there a way to force that using
SolrJ?

Thanks in advance,
Briggs

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message