Solr
  1. Solr
  2. SOLR-4182

MoreLikeThisHandler ignores mlt.count

    Details

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

      solr-impl 4.1-SNAPSHOT 1421381 - ncindex - 2012-12-13 10:16:41

      Description

      MoreLikeThisHandler ignores the mlt.count parameter. This seems to be the case whether it's on the URL path or in the handler definition.

      When using MoreLikeThisComponent in a search handler, mlt.count works.

        Activity

        Shawn Heisey made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 4.3 [ 12324128 ]
        Resolution Won't Fix [ 2 ]
        Hide
        Shawn Heisey added a comment -

        Updated wiki page with Jack's suggested documentation changes:

        http://wiki.apache.org/solr/MoreLikeThisHandler

        Show
        Shawn Heisey added a comment - Updated wiki page with Jack's suggested documentation changes: http://wiki.apache.org/solr/MoreLikeThisHandler
        Robert Muir made changes -
        Fix Version/s 4.3 [ 12324128 ]
        Fix Version/s 5.0 [ 12321664 ]
        Fix Version/s 4.2 [ 12323893 ]
        Hide
        Jack Krupansky added a comment -

        I found this comment in MoreLikeThisParams.java:

          // the /mlt request handler uses 'rows'
          public final static String DOC_COUNT = mlt.count";
        

        In other words, you're SUPPOSED to use &rows=n with the /mlt handler rather than &mlt.count=n.

        So, it's not really a bug per se, more of an inconsistency that could be improved. For example, maybe the default for &rows in the mlt handler should be &mlt.count.

        And maybe the doc could be improved a little. I would note that mlt.count is ONLY listed under the MLT search component and NOT mentioned in the handler. The doc for the handler shoulder probably explicitly say that it uses &rows rather than &mlt.count.

        Show
        Jack Krupansky added a comment - I found this comment in MoreLikeThisParams.java: // the /mlt request handler uses 'rows' public final static String DOC_COUNT = mlt.count"; In other words, you're SUPPOSED to use &rows=n with the /mlt handler rather than &mlt.count=n. So, it's not really a bug per se, more of an inconsistency that could be improved. For example, maybe the default for &rows in the mlt handler should be &mlt.count. And maybe the doc could be improved a little. I would note that mlt.count is ONLY listed under the MLT search component and NOT mentioned in the handler. The doc for the handler shoulder probably explicitly say that it uses &rows rather than &mlt.count.
        Mark Miller made changes -
        Field Original Value New Value
        Fix Version/s 4.2 [ 12323893 ]
        Fix Version/s 4.1 [ 12321141 ]
        Hide
        Shawn Heisey added a comment -

        I have not tested 4.0.0, only branch_4x.

        Side detail: I initially tried to put mlt.count into the handler as an int, but that caused a parse exception. The exception went away when I changed it to str. Don't know if this is important.

        Show
        Shawn Heisey added a comment - I have not tested 4.0.0, only branch_4x. Side detail: I initially tried to put mlt.count into the handler as an int, but that caused a parse exception. The exception went away when I changed it to str. Don't know if this is important.
        Shawn Heisey created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Shawn Heisey
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development