org.apache.storm.solr.schema

## Class SolrFieldTypeFinder

- java.lang.Object
- - org.apache.storm.solr.schema.SolrFieldTypeFinder

- All Implemented Interfaces:
    Serializable

      public class SolrFieldTypeFinder
      extends Object
      implements Serializable

  Class containing all the information relating fields with their types. This information is wrapped in the class `SolrFieldTypeFinder.FieldTypeWrapper`

  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SolrFieldTypeFinder.FieldTypeWrapper` Class wrapping all the information for fields and types.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SolrFieldTypeFinder(SchemaBuilder schemaBuilder)` Initiates class containing all the information relating fields with their types.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<String>` | `getAllSolrFieldTypes()`
    `SolrFieldTypeFinder.FieldTypeWrapper` | `getFieldTypeWrapper(String fieldName)` Finds the schema defined field that matches the input parameter, if any.
    `void` | `initialize()`
    `boolean` | `matchesDynamicField(String fieldName)`
    `boolean` | `matchesDynamicField(String fieldName, String pattern)`
    `boolean` | `matchesField(String fieldName)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SolrFieldTypeFinder

          public SolrFieldTypeFinder(SchemaBuilder schemaBuilder)

      Initiates class containing all the information relating fields with their types. This information is parsed from the schema

      Parameters:
        `schemaBuilder` - schemaBuilder to build the information about fields and types

  - ### Method Detail

    - #### initialize

          public void initialize()

    - #### getFieldTypeWrapper

          public SolrFieldTypeFinder.FieldTypeWrapper getFieldTypeWrapper(String fieldName)

      Finds the schema defined field that matches the input parameter, if any. It can be a dynamic field, in which case it will return the pattern of the dynamic field that matches the input parameter.

      Parameters:
        `fieldName` - The name of the field to get info for
      Returns:
        The `SolrFieldTypeFinder.FieldTypeWrapper` that matches the input parameter, or null if none found

    - #### getAllSolrFieldTypes

          public Set<String> getAllSolrFieldTypes()

    - #### matchesField

          public boolean matchesField(String fieldName)

    - #### matchesDynamicField

          public boolean matchesDynamicField(String fieldName)

    - #### matchesDynamicField

          public boolean matchesDynamicField(String fieldName,
                                             String pattern)

Copyright © 2021 The Apache Software Foundation. All rights reserved.