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

More Like This Handler uses only first field in mlt.fl when using stream.body

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.4
    • 7.4
    • MoreLikeThis
    • None
    • Linux,Windows

    Description

      The documentation at: http://wiki.apache.org/solr/MoreLikeThisHandler indicates that one can use multiple fields for similarity in mlt.fl:
      http://localhost:8983/solr/mlt?stream.body=electronics%20memory&mlt.fl=manu,cat&mlt.interestingTerms=list&mlt.mintf=0

      In trying this, only one field is used.
      Looking at the code, it only looks at the first field:

      public DocListAndSet getMoreLikeThis( Reader reader, int start, int rows, List<Query> filters, List<InterestingTerm> terms, int flags ) throws IOException
      {
      // analyzing with the first field: previous (stupid) behavior
      rawMLTQuery = mlt.like(reader, mlt.getFieldNames()[0]);

      Attachments

        1. SOLR-5351.patch
          15 kB
          Dawid Weiss
        2. SOLR-5351.patch
          16 kB
          Dawid Weiss

        Issue Links

          Activity

            People

              dweiss Dawid Weiss
              zygw Zygmunt Wiercioch
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: