Lucene.Net
  1. Lucene.Net
  2. LUCENENET-182

Public fields of StringIndex class should have C# like names

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Lucene.Net 2.3.2

      Description

      Public fields (lookup, order) of Lucene.Net.Search.StringIndex can be/are used outside of Lucene.Net and their names should be compatible with C#.

      DIGY

      1. LUCENENET-182.patch
        3 kB
        Digy
      2. LUCENENET-182.patch
        3 kB
        Digy

        Activity

        Hide
        Robert Jordan added a comment -
        • public StringIndex(int[] values, System.String[] lookup)
          + public StringIndex(int[] Values, System.String[] Lookup)

        This not a valid C# style. Parameters must not start with an uppercased letter.

        Show
        Robert Jordan added a comment - public StringIndex(int[] values, System.String[] lookup) + public StringIndex(int[] Values, System.String[] Lookup) This not a valid C# style. Parameters must not start with an uppercased letter.
        Hide
        Digy added a comment -

        Main point here is the casing of public fields not parameters. OK. parameter can be left as they are.

        DIGY

        Show
        Digy added a comment - Main point here is the casing of public fields not parameters. OK. parameter can be left as they are. DIGY
        Hide
        Robert Jordan added a comment -

        Parameters were always part of the API in MS.NET. I was not well communicated until now, but it will start to be an issue with the coming C# 4.0 that will support named parameters.

        Show
        Robert Jordan added a comment - Parameters were always part of the API in MS.NET. I was not well communicated until now, but it will start to be an issue with the coming C# 4.0 that will support named parameters.
        Hide
        Neal Granroth added a comment -

        Adherence to one particular set of coding style guidelines used by just one group of developers is not particularly helpful.

        Consistency with the naming conventions used by the mainline Java Lucene project is of far greater importance.

        I would recommend no change unless the current names used conflict with mainline Java Lucene.

        Show
        Neal Granroth added a comment - Adherence to one particular set of coding style guidelines used by just one group of developers is not particularly helpful. Consistency with the naming conventions used by the mainline Java Lucene project is of far greater importance. I would recommend no change unless the current names used conflict with mainline Java Lucene.
        Hide
        Digy added a comment -

        Hi Neal,

        IndexSearcher#getIndexReader --> IndexSearcher#GetIndexReader
        IndexSearcher#close --> IndexSearcher#Close
        QueryParser#parse --> QueryParser#Parse
        etc.

        these kind of changes are already made throughout the Lucene.Net.

        So, I can't see any reason why we shouldn't change
        StringIndex#loopup to StringIndex#Loopup
        and
        StringIndex#order to StringIndex#Order


        *http://incubator.apache.org/lucene.net/*
        Lucene.Net sticks to the APIs and classes used in the original Java implementation of Lucene. The API names as well as class names are preserved with the intention of giving Lucene.Net the look and feel of the C# language and the .NET Framework. For example, the method Hits.length() in the Java implementation now reads Hits.Length() in the C# port.

        DIGY

        Show
        Digy added a comment - Hi Neal, IndexSearcher#getIndexReader --> IndexSearcher#GetIndexReader IndexSearcher#close --> IndexSearcher#Close QueryParser#parse --> QueryParser#Parse etc. these kind of changes are already made throughout the Lucene.Net. So, I can't see any reason why we shouldn't change StringIndex#loopup to StringIndex#Loopup and StringIndex#order to StringIndex#Order * http://incubator.apache.org/lucene.net/* Lucene.Net sticks to the APIs and classes used in the original Java implementation of Lucene. The API names as well as class names are preserved with the intention of giving Lucene.Net the look and feel of the C# language and the .NET Framework. For example, the method Hits.length() in the Java implementation now reads Hits.Length() in the C# port. DIGY
        Hide
        Neal Granroth added a comment -

        Hi Digy,
        Thanks for the clarification.
        I was trying to champion flexibility and avoid the project being tied to tightly to specific coding styles or features like the old-style "named parameters" that is being brought back as something "new" for C# 4.0.
        – Neal

        Show
        Neal Granroth added a comment - Hi Digy, Thanks for the clarification. I was trying to champion flexibility and avoid the project being tied to tightly to specific coding styles or features like the old-style "named parameters" that is being brought back as something "new" for C# 4.0. – Neal

          People

          • Assignee:
            Unassigned
            Reporter:
            Digy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development