Solr
  1. Solr
  2. SOLR-2956

LukeRequestHandler: getFieldFlagsKey is out of sync with getFieldFlags

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      "info" section returned by the LukeRequestHandler does not contain legend for OMIT_TF and OMIT_POSITIONS flags.

      These flags are checked and outputted in LukeRequestHandler#getFieldFlags, but are not outputted in LukeRequestHandler#getFieldFlagsKey.

      1. SOLR-2956.patch
        7 kB
        Hoss Man
      2. SOLR-2956.patch
        7 kB
        Hoss Man

        Activity

        Hide
        Hoss Man added a comment -

        Yury, thanks for reporting this.

        while writing a test to ensure we output all the flags properly in the key, i also made the test check the flags for the fields and discovered we were in fact overlooking them in getFieldFlags(IndexableField) as well (just not in getFieldFlags(SchemaField)

        Attached patch should fix these problems, and ensure that any future inconsistencies introduced in the flags should cause a test error.

        (would be good to have someone else sanity check the logic i added to getFieldFlags(IndexableField))

        Show
        Hoss Man added a comment - Yury, thanks for reporting this. while writing a test to ensure we output all the flags properly in the key, i also made the test check the flags for the fields and discovered we were in fact overlooking them in getFieldFlags(IndexableField) as well (just not in getFieldFlags(SchemaField) Attached patch should fix these problems, and ensure that any future inconsistencies introduced in the flags should cause a test error. (would be good to have someone else sanity check the logic i added to getFieldFlags(IndexableField))
        Hide
        Yury Kats added a comment -

        Looks good to me, except that the two getFieldFlags method would be slightly inconsistent in their reporting:

        If a field is specified as omitTermFreqAndPositions=true,
        getFieldFlags(SchemaField) would report it as "F"
        getFieldFlags(IndexableField) would report it as "FP"

        Show
        Yury Kats added a comment - Looks good to me, except that the two getFieldFlags method would be slightly inconsistent in their reporting: If a field is specified as omitTermFreqAndPositions=true, getFieldFlags(SchemaField) would report it as "F" getFieldFlags(IndexableField) would report it as "FP"
        Hide
        Hoss Man added a comment -

        ah .. right. the existing code is being very literal about how it's configured (P is implied by F so don't output P if F is already reported)

        I've updated the patch to be consistent.

        Show
        Hoss Man added a comment - ah .. right. the existing code is being very literal about how it's configured (P is implied by F so don't output P if F is already reported) I've updated the patch to be consistent.
        Hide
        Yury Kats added a comment -

        +1 from me. Thanks.

        Show
        Yury Kats added a comment - +1 from me. Thanks.
        Hide
        Hoss Man added a comment -

        Committed revision 1214540. - trunk
        Committed revision 1214565. - 3x

        thanks for the bug report Yury!

        Show
        Hoss Man added a comment - Committed revision 1214540. - trunk Committed revision 1214565. - 3x thanks for the bug report Yury!

          People

          • Assignee:
            Hoss Man
            Reporter:
            Yury Kats
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development