Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-1822 Search Query Builder and Faceted Search in Atlas
  3. ATLAS-2121

Inconsistency in basic search results due to case sensitivity of type names

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.8-incubating, 0.9-incubating
    • Fix Version/s: 0.9-incubating, 0.8.2
    • Component/s: atlas-core
    • Labels:
      None

      Description

      Type names are case sensitive hence 2 types can be created with different cases.

      Example :
      1. type1 with attributes a , b
      2. TYPE1 with attributes c , d

      The types creation succeeds and

      /api/atlas/v2/types/entitydef/name/type1
      /api/atlas/v2/types/entitydef/name/TYPE1
      

      return the corresponding type definitions correctly.

      When an entity e1 of type1 is created,
      and when a BASIC search is fired with
      typeName= type1 , e1 is returned and
      typeName=TYPE1 also , e1 is returned.

      But in the case of DSL search ,
      typeName = type1 returns e1
      typeName = TYPE1 doesn't return any result - which is the correct behavior.

      This issue is major from tag side too because , UI Tag search is Basic and returns entity tagged with tag1 when searched for tag1 or TAG1.

      Whereas DSL search with
      classification=tag1 returns entity
      classification=TAG1 does not return any entity. - which is the correct behavior.

        Issue Links

          Activity

          Hide
          bpgergo Péter Gergő Barna added a comment -

          What is exactly the expected behavior here? The docs on the basic search does not mention whether it is case sensitive or not: http://atlas.apache.org/Search.html Do we really want the basic search to be case sensitive?

          If yes, then do we want this to be fixed in the index backend? I mean do we want to configure Solr to be case sensitive?
          I reproed this and investigated it with Solr as index backend.
          Basic search uses the fulltext_index and its case sensitivity is configured in the schema.xml: https://github.com/apache/incubator-atlas/blob/0.8-incubating/distro/src/conf/solr/schema.xml

          This is the field used:

          <dynamicField name="*_t"  type="text_general"    indexed="true"  stored="true"/>
          
          

          And this is the fieldType:

              <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
                <analyzer type="index">
                  <tokenizer class="solr.StandardTokenizerFactory"/>
                  <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
                  <!-- in this example, we will only use synonyms at query time
                  <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
                  -->
                  <filter class="solr.LowerCaseFilterFactory"/>
                </analyzer>
                <analyzer type="query">
                  <tokenizer class="solr.StandardTokenizerFactory"/>
                  <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
                  <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
                  <filter class="solr.LowerCaseFilterFactory"/>
                </analyzer>
              </fieldType>
          
          
          Show
          bpgergo Péter Gergő Barna added a comment - What is exactly the expected behavior here? The docs on the basic search does not mention whether it is case sensitive or not: http://atlas.apache.org/Search.html Do we really want the basic search to be case sensitive? If yes, then do we want this to be fixed in the index backend? I mean do we want to configure Solr to be case sensitive? I reproed this and investigated it with Solr as index backend. Basic search uses the fulltext_index and its case sensitivity is configured in the schema.xml: https://github.com/apache/incubator-atlas/blob/0.8-incubating/distro/src/conf/solr/schema.xml This is the field used: <dynamicField name="*_t" type="text_general" indexed="true" stored="true"/> And this is the fieldType: <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> <!-- in this example, we will only use synonyms at query time <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> --> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType>
          Hide
          bpgergo Péter Gergő Barna added a comment -
          Show
          bpgergo Péter Gergő Barna added a comment - this may be related to https://issues.apache.org/jira/browse/ATLAS-1925
          Hide
          bpgergo Péter Gergő Barna added a comment -

          Resolving this as a duplicate of ATLAS-2117

          Show
          bpgergo Péter Gergő Barna added a comment - Resolving this as a duplicate of ATLAS-2117
          Hide
          apoorvnaik Apoorv Naik added a comment -

          Actually the typename and tag name case sensitivity check was missed in ATLAS-2117. Reopening with a new review and patch.

          Show
          apoorvnaik Apoorv Naik added a comment - Actually the typename and tag name case sensitivity check was missed in ATLAS-2117 . Reopening with a new review and patch.
          Show
          madhan.neethiraj Madhan Neethiraj added a comment - Committed to the following branches: master: http://git-wip-us.apache.org/repos/asf/atlas/commit/c0f0abc1 branch-0.8: http://git-wip-us.apache.org/repos/asf/atlas/commit/5645c9e7

            People

            • Assignee:
              apoorvnaik Apoorv Naik
              Reporter:
              ssainath Sharmadha Sainath
              Request participants:
              None
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: