Lucene - Core
  1. Lucene - Core
  2. LUCENE-3512

Expose fields in FieldPhraseList and WeightedPhraseInfo with public getters

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4
    • Fix Version/s: None
    • Component/s: modules/highlighter
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Currently, to write a custom FragListBuilder implementation or custom highlighter, it probably will have to be placed in the org.apache.lucene.search.vectorhighlight package so that it has access to the fields in FieldPhraseList and its inner class WeightedPhraseInfo. It seems that in recent releases, getters were added for fields in many other classes in vectorhighlight, and I think it makes sense to add them for fields in FieldPhraseList as well to support such custom implementations.

      1. LUCENE-3512.patch
        0.7 kB
        Kelsey Francis

        Activity

        Kelsey Francis created issue -
        Kelsey Francis made changes -
        Field Original Value New Value
        Attachment LUCENE-3512.patch [ 12498773 ]
        Hide
        Simon Willnauer added a comment -

        that looks reasonable to me. some comments:

        • can we rename public int getSeqnum() to something more useful? it seems getPhraseNumber is better though?
        • I wonder if we really need to expose the implementation rather than the interface in public LinkedList<WeightedPhraseInfo> getPhraseList()? This should return List<WeightedPhraseInfo> instead?
        • would you mind adding one or two doc strings to those getters?
        • while you are on it feel free to add more reasonable names etc. to that class
        Show
        Simon Willnauer added a comment - that looks reasonable to me. some comments: can we rename public int getSeqnum() to something more useful? it seems getPhraseNumber is better though? I wonder if we really need to expose the implementation rather than the interface in public LinkedList<WeightedPhraseInfo> getPhraseList()? This should return List<WeightedPhraseInfo> instead? would you mind adding one or two doc strings to those getters? while you are on it feel free to add more reasonable names etc. to that class

          People

          • Assignee:
            Unassigned
            Reporter:
            Kelsey Francis
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development