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

MoreLikeThis should allow more flexible query building

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.8.1
    • None
    • MoreLikeThis

    Description

      It would be better if MoreLikeThis had more flexible query-building options. There are two main abilities that would be helpful:

      1. Allowing a DisjunctionMax query to be built instead of the plain BooleanQuery.

      2. Applying the interesting terms to all specified query fields, instead of just the field it happened to be found in.

      #1 is important because we generally find disjunction max to work better than plain boolean queries (adding the field scores together).

      At the very least, the MoreLikeThis class should be made extendable, so that we can easily add this capability with a custom plugin, without having to rewrite all of the class.

      I.e., at its most basic, this could be resolved by making both "createQuery" methods "protected" instead of "private" so that we could then just override this method if we wanted to implement different ways of building the query, without changing anything else.

      At the other extreme, potentially the more complex resolution, it might be nice to be able to specify a search handler to use and then MoreLikeThis would create the query from that search handler. For example, fi the search handler used the eDisMax parser and specified a number of "qf", "pf", and boosts, then all those would be used to construct the mlt query, using the interesting terms generated.

      Attachments

        Activity

          People

            Unassigned Unassigned
            brian44 Brian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: