Examples of SolrCore


Examples of org.apache.solr.core.SolrCore

    super.setUp();

    SolrResourceLoader loader = new SolrResourceLoader(getSolrHome());
    CoreContainer container = new CoreContainer(loader);
    CoreDescriptor descriptor = new CoreDescriptor(container, "cname", ".");
    SolrCore core = container.create(descriptor);
    container.register(core.getName(), core, false);

    solr = new EmbeddedSolrServer(container, core.getName());
  }
View Full Code Here

Examples of org.apache.solr.core.SolrCore

   
    SolrResourceLoader loader = new SolrResourceLoader( getSolrHome() );
    CoreContainer container = new CoreContainer( loader );
    CoreDescriptor descriptor = new CoreDescriptor(container,
        "cname", "." );
    SolrCore core = container.create(descriptor);
    container.register( core.getName(), core, false );

    solr = new EmbeddedSolrServer(container, core.getName());
  }
View Full Code Here

Examples of org.apache.solr.core.SolrCore

  }

  @Test
  public void testCopyFieldFunctionality()
    {
      SolrCore core = h.getCore();
      assertU(adoc("id", "10", "title", "test copy field", "text_en", "this is a simple test of the copy field functionality"));
      assertU(commit());
     
      Map<String,String> args = new HashMap<String, String>();
      args.put( CommonParams.Q, "text_en:simple" );
View Full Code Here

Examples of org.apache.solr.core.SolrCore

   * <dynamicField name="*_dynamic" type="string" indexed="true" stored="true"/>
   */
  @Test
  public void testDynamicCopy()
  {
    SolrCore core = h.getCore();
    assertU(adoc("id", "10", "title", "test", "aaa_dynamic", "aaa"));
    assertU(commit());
   
    Map<String,String> args = new HashMap<String, String>();
    args.put( CommonParams.Q, "title:test" );
View Full Code Here

Examples of org.apache.solr.core.SolrCore

    clearIndex();
  }

  @Test
  public void testSimilarityFactory() {
    SolrCore core = h.getCore();
    Similarity similarity = core.getSchema().getSimilarity();
    assertTrue("wrong class", similarity instanceof MockConfigurableSimilarity);
    assertEquals("is there an echo?", ((MockConfigurableSimilarity)similarity).getPassthrough());
  }
View Full Code Here

Examples of org.apache.solr.core.SolrCore

    // any field manipulation needs to happen when you know the core will not
    // be accepting any requests.  Typically this is done within the inform()
    // method.  Since this is a single threaded test, we can change the fields
    // willi-nilly

    SolrCore core = h.getCore();
    IndexSchema schema = core.getSchema();
    final String fieldName = "runtimefield";
    SchemaField sf = new SchemaField( fieldName, schema.getFieldTypes().get( "string" ) );
    schema.getFields().put( fieldName, sf );
   
    // also register a new copy field (from our new field)
View Full Code Here

Examples of org.apache.solr.core.SolrCore

    clearIndex();
  }
 
  @Test
  public void testIsDynamicField() throws Exception {
    SolrCore core = h.getCore();
    IndexSchema schema = core.getSchema();
    assertFalse( schema.isDynamicField( "id" ) );
    assertTrue( schema.isDynamicField( "aaa_i" ) );
    assertFalse( schema.isDynamicField( "no_such_field" ) );
  }
View Full Code Here

Examples of org.apache.solr.core.SolrCore

    assertFalse( schema.isDynamicField( "no_such_field" ) );
  }

  @Test
  public void testProperties() throws Exception{
    SolrCore core = h.getCore();
    IndexSchema schema = core.getSchema();
    assertFalse(schema.getField("id").multiValued());

  }
View Full Code Here

Examples of org.apache.solr.core.SolrCore

    public CoreContainer initialize() {
      CoreContainer container = new CoreContainer(new SolrResourceLoader(SolrResourceLoader.locateSolrHome()));
      CoreDescriptor dcore = new CoreDescriptor(container, coreName, solrConfig.getResourceLoader().getInstanceDir());
      dcore.setConfigName(solrConfig.getResourceName());
      dcore.setSchemaName(indexSchema.getResourceName());
      SolrCore core = new SolrCore( null, dataDirectory, solrConfig, indexSchema, dcore);
      container.register(coreName, core, false);
      return container;
    }
View Full Code Here

Examples of org.apache.solr.core.SolrCore

  }
 
 
  public void testSevereErrors()
  {
    SolrCore core = h.getCore();
    IndexSchema schema = core.getSchema();

    for( Throwable t : SolrConfig.severeErrors ) {
      log.info( "got ex:"+t.getMessage() );
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.