Package com.sematext.searchschemer.index

Examples of com.sematext.searchschemer.index.BasicIndexStructure.addField()


public class ElasticsearchStructureWriterTest extends TestCase {
  @Test
  public void testWriteNonDynamic() throws Exception {
    IndexStructure structure = new BasicIndexStructure();
    structure.addField("cat", new ElasticSearchFieldAttributes("cat", "string", "yes", "analyzed"), false);

    StringWriter writer = new StringWriter();
    ElasticsearchIndexStructureWriter indexWriter = new ElasticsearchIndexStructureWriter();
    indexWriter.write(structure, writer);
View Full Code Here


  }

  @Test
  public void testWriteMultipleNonDynamic() throws Exception {
    IndexStructure structure = new BasicIndexStructure();
    structure.addField("cat", new ElasticSearchFieldAttributes("cat", "string", "yes", "analyzed"), false);
    structure.addField("menu", new ElasticSearchFieldAttributes("menu", "string", "yes", "no"), false);

    StringWriter writer = new StringWriter();
    ElasticsearchIndexStructureWriter indexWriter = new ElasticsearchIndexStructureWriter();
    indexWriter.write(structure, writer);
View Full Code Here

  @Test
  public void testWriteMultipleNonDynamic() throws Exception {
    IndexStructure structure = new BasicIndexStructure();
    structure.addField("cat", new ElasticSearchFieldAttributes("cat", "string", "yes", "analyzed"), false);
    structure.addField("menu", new ElasticSearchFieldAttributes("menu", "string", "yes", "no"), false);

    StringWriter writer = new StringWriter();
    ElasticsearchIndexStructureWriter indexWriter = new ElasticsearchIndexStructureWriter();
    indexWriter.write(structure, writer);
View Full Code Here

  }

  @Test
  public void testWriteDynamic() throws Exception {
    IndexStructure structure = new BasicIndexStructure();
    structure.addField("*_string", new ElasticSearchFieldAttributes("*_string", "string", "yes", "no"), true);

    StringWriter writer = new StringWriter();
    ElasticsearchIndexStructureWriter indexWriter = new ElasticsearchIndexStructureWriter();
    indexWriter.write(structure, writer);

View Full Code Here

    IndexStructure structure = new BasicIndexStructure();
    ElasticSearchFieldAttributes field = new ElasticSearchFieldAttributes("cat", "string", "yes", "analyzed");
    field.setOmitNorms(true);
    field.setOmitTermFreqAndPositions(true);
    field.setBoost(2.0f);
    structure.addField("cat", field, false);

    StringWriter writer = new StringWriter();
    ElasticsearchIndexStructureWriter indexWriter = new ElasticsearchIndexStructureWriter();
    indexWriter.write(structure, writer);
View Full Code Here

public class SolrIndexStructureWriterTest extends TestCase {
  @Test
  public void testWriteNonDynamic() throws Exception {
    IndexStructure structure = new BasicIndexStructure();
    structure.addField("cat", new SolrFieldAttributes("cat", "string", true, true, false), false);

    StringWriter writer = new StringWriter();
    SolrIndexStructureWriter solrIndexStructurWriter = new SolrIndexStructureWriter();
    solrIndexStructurWriter.write(structure, writer);
View Full Code Here

  }

  @Test
  public void testWriteDynamic() throws Exception {
    IndexStructure structure = new BasicIndexStructure();
    structure.addField("*_int", new SolrFieldAttributes("*_int", "string", false, true, false), true);

    StringWriter writer = new StringWriter();
    SolrIndexStructureWriter solrIndexStructurWriter = new SolrIndexStructureWriter();
    solrIndexStructurWriter.write(structure, writer);

View Full Code Here

  }

  @Test
  public void testWriteMultiple() throws Exception {
    IndexStructure structure = new BasicIndexStructure();
    structure.addField("cat", new SolrFieldAttributes("cat", "string", true, true, false), false);
    structure.addField("menu", new SolrFieldAttributes("menu", "string", false, true, false), false);

    StringWriter writer = new StringWriter();
    SolrIndexStructureWriter solrIndexStructurWriter = new SolrIndexStructureWriter();
    solrIndexStructurWriter.write(structure, writer);
View Full Code Here

  @Test
  public void testWriteMultiple() throws Exception {
    IndexStructure structure = new BasicIndexStructure();
    structure.addField("cat", new SolrFieldAttributes("cat", "string", true, true, false), false);
    structure.addField("menu", new SolrFieldAttributes("menu", "string", false, true, false), false);

    StringWriter writer = new StringWriter();
    SolrIndexStructureWriter solrIndexStructurWriter = new SolrIndexStructureWriter();
    solrIndexStructurWriter.write(structure, writer);
View Full Code Here

  }

  @Test
  public void testWriteMultivalued() throws Exception {
    IndexStructure structure = new BasicIndexStructure();
    structure.addField("cat", new SolrFieldAttributes("cat", "string", true, true, true), false);

    StringWriter writer = new StringWriter();
    SolrIndexStructureWriter solrIndexStructurWriter = new SolrIndexStructureWriter();
    solrIndexStructurWriter.write(structure, writer);
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.