Solr
  1. Solr
  2. SOLR-405

Search additional fields when using DisMaxRequestHandler

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: search
    • Labels:
      None

      Description

      We are heavily leaning towards using a few DisMaxRequestHandlers for searching instead of copy fields, but we ran into an issue. Currently our sites use something like a copy field to search stories, but they also need to search additional fields (like story_source, which we don't want in the dismax). With the DisMaxRequestHandler as it is, anything you have in the q param is searched for in the fields defined in the DisMaxRequestHandler. We need a little more flexibility with this.

      As an example, if you search for something like "bush+AND+story_source:associated", all the fields in the dismax are searched for 'bush' and 'story_source:associated'. (The story_source field is not in the dismax handler, and we don't want it to be.) What we want to do is search the fields defined in the dismax for 'bush', but also query the story_source field (and only the story_source field) for 'associated'.

      We came up with this small patch to let us do what we need, but wanted to throw it out there in case others were interested, or know of a better way to do this. We're not entirely sure we did this in the right place and are hoping that maybe someone can provide some insight on that as well.

        Issue Links

          Activity

          Jan Høydahl made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Won't Fix [ 2 ]
          Yonik Seeley made changes -
          Link This issue is blocked by SOLR-1553 [ SOLR-1553 ]
          Doug Steigerwald made changes -
          Field Original Value New Value
          Attachment dismax_additional_fields.patch [ 12368828 ]
          Doug Steigerwald created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Doug Steigerwald
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development