Package com.sematext.searchschemer.index

Examples of com.sematext.searchschemer.index.FieldAttributes.fieldType()


        .getResource("senseidb/test_senseidb_schema_small.xml").getFile()));
    assertEquals(1, reader.readFields().size());
    FieldAttributes field = reader.readFields().get(0);
    assertNotNull(field);
    assertEquals("contents", field.name());
    assertEquals(FieldType.TEXT, field.fieldType());
    assertTrue(field.store());
    assertTrue(field.analyzed());
    assertTrue(field.multiValued());
    assertTrue(field.indexed());
  }
View Full Code Here


    ElasticSearchFieldsDefinitionReader reader = new ElasticSearchFieldsDefinitionReader(new File(getClass().getClassLoader()
        .getResource("elasticsearch/elasticsearch_test_mappings_single_field.json").getFile()));
    assertEquals(1, reader.readFields().size());
    FieldAttributes field = reader.readFields().get(0);
    assertEquals("id", field.name());
    assertEquals(FieldType.LONG, field.fieldType());
    assertTrue(field.analyzed());
    assertTrue(field.multiValued());
    assertTrue(field.indexed());
    assertFalse(field.store());
  }
View Full Code Here

    SolrStaticFieldsDefinitionReader reader = new SolrStaticFieldsDefinitionReader(new File(getClass().getClassLoader()
        .getResource("solr/test_schema_small.xml").getFile()));
    assertEquals(1, reader.readFields().size());
    FieldAttributes field = reader.readFields().get(0);
    assertEquals("id", field.name());
    assertEquals(FieldType.STRING, field.fieldType());
    assertTrue(field.indexed());
    assertTrue(field.store());
    assertFalse(field.analyzed());
  }
 
View Full Code Here

    SolrStaticFieldsDefinitionReader reader = new SolrStaticFieldsDefinitionReader(new File(getClass().getClassLoader()
        .getResource("solr/test_schema_small_string_text.xml").getFile()));
    assertEquals(1, reader.readFields().size());
    FieldAttributes field = reader.readFields().get(0);
    assertEquals("id", field.name());
    assertEquals(FieldType.TEXT, field.fieldType());
    assertTrue(field.indexed());
    assertTrue(field.store());
    assertTrue(field.analyzed());
  }
 
View Full Code Here

    SolrStaticFieldsDefinitionReader reader = new SolrStaticFieldsDefinitionReader(new File(getClass().getClassLoader()
        .getResource("solr/test_schema_additional_attributes.xml").getFile()));
    assertEquals(1, reader.readFields().size());
    FieldAttributes field = reader.readFields().get(0);
    assertEquals("id", field.name());
    assertEquals(FieldType.TEXT, field.fieldType());
    assertTrue(field.indexed());
    assertTrue(field.store());
    assertTrue(field.analyzed());
    assertTrue(field.omitNorms());
    assertTrue(field.omitTermFrequencyAndPositions());
View Full Code Here

        .getResource("solr/test_schema_small_dynamic.xml").getFile()));
    assertEquals(1, reader.readFields().size());
    FieldAttributes field = reader.readFields().get(0);
    assertNotNull(field);
    assertEquals("*_i", field.name());
    assertEquals(FieldType.INTEGER, field.fieldType());
  }
}
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.