Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      any

    • Lucene Fields:
      New

      Description

      The API of Lucene is totally inconsistent:

      1)
      There are a lot of containers which don't implement an interface which indicates this fact
      (for pre-java-1.5 Lucene it could be Collection, for post-ajva-1.5 Lucene it could be more general Iterable)

      Example:
      IndexSearcher: "int maxDoc()" and "doc(int i)"

      2)
      There are a lot of classes having non-final public accessible fields.

      3)
      Some methods which return values are named something() others are named getSomething()

      Best one is: Fieldable:
      without get: String stringValue(), Reader readerValue(), byte[] binaryValue(), ...
      with get: byte[] getBinaryValue(), int getBinaryLength(), ...

        Activity

        Ivan.S created issue -
        Hide
        Mark Miller added a comment -

        Patch coming?

        I'd classify as improvement rather than bug to start. Also, keep in mind that everything will have to be backward compatible (though that gets fuzzier as we approach version 3)

        Show
        Mark Miller added a comment - Patch coming? I'd classify as improvement rather than bug to start. Also, keep in mind that everything will have to be backward compatible (though that gets fuzzier as we approach version 3)
        Mark Miller made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Hide
        Michael Busch added a comment -

        I agree that there are several APIs that could be improved in Lucene. However, opening an issue like this is not very helpful.

        Please open a more specific issue for a particular API you'd like to fix, attach a patch that deprecates the old one, introduces a new one, maintains backwards-compatibility and provides unit tests. (see LUCENE-1422 as a current example).

        If you don't want to provide such a patch then you can also start a discussion on the mailinglists and suggest API improvements.

        Show
        Michael Busch added a comment - I agree that there are several APIs that could be improved in Lucene. However, opening an issue like this is not very helpful. Please open a more specific issue for a particular API you'd like to fix, attach a patch that deprecates the old one, introduces a new one, maintains backwards-compatibility and provides unit tests. (see LUCENE-1422 as a current example). If you don't want to provide such a patch then you can also start a discussion on the mailinglists and suggest API improvements.
        Michael Busch made changes -
        Resolution Incomplete [ 4 ]
        Status Open [ 1 ] Closed [ 6 ]
        Hide
        Uwe Schindler added a comment -

        In my opinion, these are things that are really not nice currently. The next major version of Lucene should really fix these annoying inconsistencies (especially for beginners).

        I would be happy to help cleaning the API through 2.9 / 3.0 after some discussion about this!

        Show
        Uwe Schindler added a comment - In my opinion, these are things that are really not nice currently. The next major version of Lucene should really fix these annoying inconsistencies (especially for beginners). I would be happy to help cleaning the API through 2.9 / 3.0 after some discussion about this!
        Hide
        Ivan.S added a comment -

        I was thinking about this issue as a "request". Sadly, I currently don't have time to crawl through an unknown API and search for all inconsistencies.
        The comments imply, that other people know what I'm talking about. So perhaps, instead of closing the issue as 'incomplete', someone (who already KNOWS this API) could list most frequent 'inconsistent' classes?
        The fact that I'm new to Lucene makes it very probable that my proposed patches will be rejected anyway (because they would just "not fit" somehow).
        Second thing is: I read few comments about java-1.5-only vs not-java-1.5-only policy for future Lucene. It seems that even the developers can't agree on this issue. How could I?

        Show
        Ivan.S added a comment - I was thinking about this issue as a "request". Sadly, I currently don't have time to crawl through an unknown API and search for all inconsistencies. The comments imply, that other people know what I'm talking about. So perhaps, instead of closing the issue as 'incomplete', someone (who already KNOWS this API) could list most frequent 'inconsistent' classes? The fact that I'm new to Lucene makes it very probable that my proposed patches will be rejected anyway (because they would just "not fit" somehow). Second thing is: I read few comments about java-1.5-only vs not-java-1.5-only policy for future Lucene. It seems that even the developers can't agree on this issue. How could I?
        Hide
        Steve Rowe added a comment -

        Ivan,

        I'm sorry to hear that you don't have time to devote to this issue. Patches regularly go through a vetting process, so don't assume that yours would be rejected, as long as you are willing to accept guidance concerning the "not fitting". In fact, you are in a perfect position to help, since your fresh take on the issues reflect a very common user experience. Please don't give up.

        My suggestion, like Michael's: open a new issue with a focused suggestion, and provide a patch.

        Show
        Steve Rowe added a comment - Ivan, I'm sorry to hear that you don't have time to devote to this issue. Patches regularly go through a vetting process, so don't assume that yours would be rejected, as long as you are willing to accept guidance concerning the "not fitting". In fact, you are in a perfect position to help, since your fresh take on the issues reflect a very common user experience. Please don't give up. My suggestion, like Michael's: open a new issue with a focused suggestion, and provide a patch.
        Hide
        Ivan.S added a comment - - edited

        Can anyone open an umbrella bug for this?
        I think we should first collect all inconsistencies, then someone (including me) start to make patches.

        BTW one more thing I've noticed: some methods even start with uppercase.
        Common, there are books written about Lucene, such things are just painful
        It needs a clear API.

        I'm now using Lucene in a project, it helps, I like it. So I would like to contribute (my time and) patches after
        we've sorted out, what the inconsistencies are, sort them by priority, and collect their locations.

        Umbrella bug or not?

        Show
        Ivan.S added a comment - - edited Can anyone open an umbrella bug for this? I think we should first collect all inconsistencies, then someone (including me) start to make patches. BTW one more thing I've noticed: some methods even start with uppercase. Common, there are books written about Lucene, such things are just painful It needs a clear API. I'm now using Lucene in a project, it helps, I like it. So I would like to contribute (my time and) patches after we've sorted out, what the inconsistencies are, sort them by priority, and collect their locations. Umbrella bug or not?
        Hide
        Otis Gospodnetic added a comment -

        Wiki may be more suitable for that.
        Note that it may be better to work on getting more of the pending patches reviewed and tested, so they can be committed faster. That way we can then proceed to making API changes that won't break existing/pending patches.

        Show
        Otis Gospodnetic added a comment - Wiki may be more suitable for that. Note that it may be better to work on getting more of the pending patches reviewed and tested, so they can be committed faster. That way we can then proceed to making API changes that won't break existing/pending patches.
        Hide
        Ivan.S added a comment -

        I created a Wiki page for this issue
        http://wiki.apache.org/jakarta-lucene/MakingApiConsistent

        I hope that many people will find this issue important and help with this.

        Show
        Ivan.S added a comment - I created a Wiki page for this issue http://wiki.apache.org/jakarta-lucene/MakingApiConsistent I hope that many people will find this issue important and help with this.
        Hide
        Ivan.S added a comment -

        No one seems to care about this issue since it is closed, so I dare to reopen it (after I created a Wiki page as proposed by others).
        Please, everyone who knows inconsistencies in Lucene API (there seems to be plenty of)
        please report to Wiki page: http://wiki.apache.org/jakarta-lucene/MakingApiConsistent
        Thank you.

        Show
        Ivan.S added a comment - No one seems to care about this issue since it is closed, so I dare to reopen it (after I created a Wiki page as proposed by others). Please, everyone who knows inconsistencies in Lucene API (there seems to be plenty of) please report to Wiki page: http://wiki.apache.org/jakarta-lucene/MakingApiConsistent Thank you.
        Ivan.S made changes -
        Resolution Incomplete [ 4 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Mark Miller made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Mark Thomas made changes -
        Workflow jira [ 12445803 ] Default workflow, editable Closed status [ 12563077 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12563077 ] jira [ 12584064 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        2h 25m 1 Michael Busch 07/Nov/08 14:59
        Closed Closed Reopened Reopened
        12d 7h 33m 1 Ivan.S 19/Nov/08 22:33
        Reopened Reopened Closed Closed
        264d 1h 52m 1 Mark Miller 11/Aug/09 01:26

          People

          • Assignee:
            Unassigned
            Reporter:
            Ivan.S
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development