Based on the functionality diff, there are a few differences in the <indexDefaults> directive. They are highlighted below along with some background information regarding the differences.

maxMergeDocs
Apache Solr Search Integration: 2147483647
Search API Solr: No value

maxFieldLength
Apache Solr Search Integration: 20000
Search API Solr: 10000

#348832: increase maxFieldLength

mergeFactor
Apache Solr Search Integration: 4
Search API Solr: 10

#388120: MergeFactor should be lower for faster searching

mergePolicy
Apache Solr Search Integration: Uses org.apache.lucene.index.LogByteSizeMergePolicy, the Lucene 2.2 default
Search API Solr: No value

http://java.dzone.com/news/merge-policy-internals-solr

Comments

pwolanin’s picture

We increased maxFieldLength because large docs, e.g. extracted PDFs, were truncated. Possibly it should be even larger.

Lucene in Action suggests making this unlimited, but I can't remember if Solr passes through that setting.

maxMergeDocs being set is likely carried forward from an old config.

Because we are setting the lucene match, we need to also set the mergePolicy to restore that older default - Nick_vh did load testing and the default Solr 3.5 policy gave slower searches.

pwolanin’s picture

Here's the comment from the example config:

The Merge Policy in Lucene controls how merging is handled by
Lucene. The default in Solr 3.3 is TieredMergePolicy.

The default in 2.3 was the LogByteSizeMergePolicy,
previous versions used LogDocMergePolic

cpliakas’s picture

Component: Code » solrconfig.xml

Adding new component flag.

drunken monkey’s picture

Component: solrconfig.xml » Code

The apachesolr module's config seems fine here, I'd readily adopt that in the Search API. An unlimited setting for maxFieldLength would probably be great, too (unless there are general disadvantages besides possible memory usage). Maybe someone could test or research that?

drunken monkey’s picture

Component: Code » solrconfig.xml

I should remember always to refresh beofre commenting …

nick_vh’s picture

Some discussion here : http://grokbase.com/t/lucene/solr-user/10by60t7jf/how-to-set-maxfieldlen... + http://osdir.com/ml/solr-user.lucene.apache.org/2011-11/msg00573.html + http://www.gossamer-threads.com/lists/lucene/general/140440

It is actually deprecated (http://lucene.apache.org/core/3_6_0/api/all/org/apache/lucene/index/Inde... ) and should not be used. We should use LimitTokenCountAnalyzer (http://lucene.apache.org/core/3_6_0/api/all/org/apache/lucene/analysis/L...)

Not sure how to implement LimitTokenCountAnalyzer in the config but I think the path forward is to throw this value out the config and test if is cut off

pwolanin’s picture

Well, we want to have a config that works reasonably for 1.4 still and more or less the same as 3.5.

Also, not clear that 3.5.0 supports LimitTokenCountAnalyzer.

It doesn't seem like there is an "unlimited" setting that Solr accepts, but we could e.g. increase to 100000 or more from 20000.

cpliakas’s picture

Status: Active » Reviewed & tested by the community

Based on the discussion here, I am marking as RTBC and using Apache Solr Search Integration's settings minus commitLockTimeout (see #1606138: commitLockTimeout removed from Solr 3.x configurations) and changing maxFieldLength to 100000. If we want to change these directives we can post an issue and iterate, but for the sake of applying the consensus changes I think we have reached that.

cpliakas’s picture

Status: Reviewed & tested by the community » Fixed
cpliakas’s picture

cpliakas’s picture

I suck at this game. Follow-up commit that sets the mergeFactor to 4 at http://drupalcode.org/sandbox/cpliakas/1600962.git/commit/bc1d397.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.