Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2956

LukeRequestHandler: getFieldFlagsKey is out of sync with getFieldFlags

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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
        hossman 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
        hossman 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
        ykats 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
        ykats 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
        hossman 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
        hossman 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
        ykats Yury Kats added a comment -

        +1 from me. Thanks.

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

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

        thanks for the bug report Yury!

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development