Projects >> lucene-solr >>4df2d086a79e5f03f7d8d91badfa00e41ea48541

Chunk
Conflicting content
=======
import org.apache.lucene.index.OrdTermState;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.codecs.Codec;
<<<<<<< HEAD
import org.apache.lucene.index.codecs.CodecProvider;
import org.apache.lucene.search.CollectionStatistics;
>>>>>>> 033cfff00709a89e1f264af76f2e21233769f731
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
Solution content
import org.apache.lucene.index.OrdTermState;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.codecs.Codec;
import org.apache.lucene.search.CollectionStatistics;
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
File
TestSimilarityBase.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
   * @throws AlreadyClosedException if the Spellchecker is already closed
   * @throws IOException
   */
<<<<<<< HEAD
  public final void indexDictionary(Dictionary dict, int mergeFactor, int ramMB, boolean optimize) throws IOException {
    IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_CURRENT, null)
    .setRAMBufferSizeMB(ramMB);
    ((TieredMergePolicy)config.getMergePolicy()).setMaxMergeAtOnce(mergeFactor);
    indexDictionary(dict, config, optimize);
  }

=======
>>>>>>> 033cfff00709a89e1f264af76f2e21233769f731
  public final void indexDictionary(Dictionary dict, IndexWriterConfig config, boolean optimize) throws IOException {
    synchronized (modifyCurrentIndexLock) {
      ensureOpen();
Solution content
   * @throws AlreadyClosedException if the Spellchecker is already closed
   * @throws IOException
   */
  public final void indexDictionary(Dictionary dict, IndexWriterConfig config, boolean optimize) throws IOException {
    synchronized (modifyCurrentIndexLock) {
      ensureOpen();
File
SpellChecker.java
Developer's decision
Version 2
Kind of conflict
Method declaration
Chunk
Conflicting content
    try {
      loadExternalFileDictionary(core);
      spellChecker.clearIndex();
<<<<<<< HEAD
      // TODO: you should be able to specify the IWC params?
      IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_CURRENT, null);
      // TODO: if we enable this, codec gets angry since field won't exist in the schema
      // config.setCodec(core.getCodec());
      ((TieredMergePolicy)config.getMergePolicy()).setMaxMergeAtOnce(300);
      // TODO: does Solr really want to continue passing 'optimize=true' to the spellchecker here?
      // (its been doing this behind the scenes all along, but its wasteful.
      spellChecker.indexDictionary(dictionary, config, true);
=======
      spellChecker.indexDictionary(dictionary, new IndexWriterConfig(core.getSolrConfig().luceneMatchVersion, null), false);
>>>>>>> 033cfff00709a89e1f264af76f2e21233769f731
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
Solution content
    try {
      loadExternalFileDictionary(core);
      spellChecker.clearIndex();
      // TODO: you should be able to specify the IWC params?
      // TODO: if we enable this, codec gets angry since field won't exist in the schema
      // config.setCodec(core.getCodec());
      spellChecker.indexDictionary(dictionary, new IndexWriterConfig(core.getSolrConfig().luceneMatchVersion, null), false);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
File
FileBasedSpellChecker.java
Developer's decision
Combination
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriterConfig;
<<<<<<< HEAD
import org.apache.lucene.index.TieredMergePolicy;
=======
>>>>>>> 033cfff00709a89e1f264af76f2e21233769f731
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.search.spell.HighFrequencyDictionary;
import org.apache.lucene.util.Version;
Solution content
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.search.spell.HighFrequencyDictionary;
File
IndexBasedSpellChecker.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
      // an incremental update is faster (just adds new terms), but if you 'expunged'
      // old terms I think they might hang around.
      spellChecker.clearIndex();
<<<<<<< HEAD
      // TODO: you should be able to specify the IWC params?
      IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_CURRENT, null);
      
      // TODO: if we enable this, codec gets angry since field won't exist in the schema
      // config.setCodec(core.getCodec());
      ((TieredMergePolicy)config.getMergePolicy()).setMaxMergeAtOnce(300);
      // TODO: does Solr really want to continue passing 'optimize=true' to the spellchecker here?
      // (its been doing this behind the scenes all along, but its wasteful.
      spellChecker.indexDictionary(dictionary, config, true);
=======
      spellChecker.indexDictionary(dictionary, new IndexWriterConfig(core.getSolrConfig().luceneMatchVersion, null), false);
>>>>>>> 033cfff00709a89e1f264af76f2e21233769f731

    } catch (IOException e) {
      throw new RuntimeException(e);
Solution content
      // an incremental update is faster (just adds new terms), but if you 'expunged'
      // old terms I think they might hang around.
      spellChecker.clearIndex();
      // TODO: you should be able to specify the IWC params?
      // TODO: if we enable this, codec gets angry since field won't exist in the schema
      // config.setCodec(core.getCodec());
      spellChecker.indexDictionary(dictionary, new IndexWriterConfig(core.getSolrConfig().luceneMatchVersion, null), false);
    } catch (IOException e) {
      throw new RuntimeException(e);
File
IndexBasedSpellChecker.java
Developer's decision
Combination
Kind of conflict
Comment
Method invocation
Variable