> > This should not be required, because I am building from source. I compiled > Solr from lucene-solr source checked out from branch_4x. I grepped the > entire tree for lucene-codec and found nothing. > > It turns out that running 'ant generate-maven-artifacts' created the jar file > -- along with a huge number of other jars that I don't need. It took an > extremely long time to run, for a jar that's a little over 300KB. > > I would argue that the codecs jar should be created by compiling a dist > target for Solr. Someone else should determine whether it's appropriate to > put it in the .war file, but I think it's important enough to make available > without compiling everything in the Lucene universe.
I agree - it looks as though the codecs module wasn't added to the solr build when it was split off. I've created a JIRA ticket (https://issues.apache.org/jira/browse/SOLR-3947) and added a patch. On the error below, I'll have to defer to someone who knows how this actually works... > > I put this jar in my lib, and now I get a new error when I try the > BloomFilter postingsFormat: > > SEVERE: null:java.lang.UnsupportedOperationException: Error - > org.apache.lucene.codecs.bloom.BloomFilteringPostingsFormat has been > constructed without a choice of PostingsFormat > at > org.apache.lucene.codecs.bloom.BloomFilteringPostingsFormat.fieldsConsumer(BloomFilteringPostingsFormat.java:139) > at > org.apache.lucene.codecs.perfield.PerFieldPostingsFormat$FieldsWriter.addField(PerFieldPostingsFormat.java:130) > at > org.apache.lucene.index.FreqProxTermsWriterPerField.flush(FreqProxTermsWriterPerField.java:335) > at > org.apache.lucene.index.FreqProxTermsWriter.flush(FreqProxTermsWriter.java:85) > at org.apache.lucene.index.TermsHash.flush(TermsHash.java:117) > at org.apache.lucene.index.DocInverter.flush(DocInverter.java:53) > at > org.apache.lucene.index.DocFieldProcessor.flush(DocFieldProcessor.java:82) > at > org.apache.lucene.index.DocumentsWriterPerThread.flush(DocumentsWriterPerThread.java:483) > at > org.apache.lucene.index.DocumentsWriter.doFlush(DocumentsWriter.java:422) > at > org.apache.lucene.index.DocumentsWriter.flushAllThreads(DocumentsWriter.java:559) > at > org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:2656) > at > org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:2792) > at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:2772) > at > org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:525) > at > org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:87) > at > org.apache.solr.update.processor.UpdateRequestProcessor.processCommit(UpdateRequestProcessor.java:64) > at > org.apache.solr.update.processor.DistributedUpdateProcessor.processCommit(DistributedUpdateProcessor.java:1007) > at > org.apache.solr.handler.RequestHandlerUtils.handleCommit(RequestHandlerUtils.java:69) > at > org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1750) > at > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:455) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:276) > >