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

UI: query links from the "Top Terms" table on the Schema Browser page should use the "term" parser

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0.1, 6.1, 7.0
    • Component/s: Admin UI
    • Labels:
      None

      Description

      If you are using a StrField, or a TextField with a Keyword tokenizer then it's very possible your indexed terms will include white space.

      But the links created by the Schema Browser UI screen to serach for a term in the "Top Terms" list assume that just prepending hte term with the fieldname (ie: $fieldname + ":" $term) will be valid – and instead they don't match the correct term.


      Example:

      Load the example/films data into a "films" collection, and then load the Schema Browser page for the "genre" field...

      http://127.0.1.1:8983/solr/#/films/schema?field=genre

      The "Top Terms" list includes terms such as Rommance Film but clicking on this term takes you to this URL...

      http://127.0.1.1:8983/solr/#/films/query?q=genre:Romance%20Film

      ...which is just doing a search for "genre:Romance" OR "Film" (in the default field)

      Instead it should link to...
      http://127.0.1.1:8983/solr/#/gettingstarted/query?q=%7B!term+f=genre%7DRomance+Film

        Issue Links

          Activity

          Hide
          hossman Hoss Man added a comment -

          here's a patch that seems to fix things.

          I was a little that angular didn't seem to have a built in mechanism for URI escaping things when building links, and after a bit of googling suggested that defining a 1 line "filter" was the right course of action, i was still surprised that we didn't seem to have one defined - so this patch adds one.

          Now even terms like this link correctly from schema browser to the query screen...

          curl -H 'Content-Type: application/json' --data-binary '[{"id":"HOSS", "foo_s":"= < \\\""}]' 'http://localhost:8983/solr/techproducts/update?commit=true'
          

          Upayavira - does this look good to you? is there a better way to do this?

          Show
          hossman Hoss Man added a comment - here's a patch that seems to fix things. I was a little that angular didn't seem to have a built in mechanism for URI escaping things when building links, and after a bit of googling suggested that defining a 1 line "filter" was the right course of action, i was still surprised that we didn't seem to have one defined - so this patch adds one. Now even terms like this link correctly from schema browser to the query screen... curl -H 'Content-Type: application/json' --data-binary '[{"id":"HOSS", "foo_s":"= < \\\""}]' 'http://localhost:8983/solr/techproducts/update?commit=true' Upayavira - does this look good to you? is there a better way to do this?
          Hide
          upayavira Upayavira added a comment -

          Chris Hostetter (Unused) heck, you're getting good at this! Patch looks good to me

          Show
          upayavira Upayavira added a comment - Chris Hostetter (Unused) heck, you're getting good at this! Patch looks good to me
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 10338a934fafe0ce597651d220da1d2adfc2eab1 in lucene-solr's branch refs/heads/branch_6x from Chris Hostetter (Unused)
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=10338a9 ]

          SOLR-8990: Fix top term links from schema browser page to use

          {!term}

          parser

          Show
          jira-bot ASF subversion and git services added a comment - Commit 10338a934fafe0ce597651d220da1d2adfc2eab1 in lucene-solr's branch refs/heads/branch_6x from Chris Hostetter (Unused) [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=10338a9 ] SOLR-8990 : Fix top term links from schema browser page to use {!term} parser
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit c574a91e3b3b64fd1cb61b0463f3019689f4f4a5 in lucene-solr's branch refs/heads/master from Chris Hostetter (Unused)
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c574a91 ]

          SOLR-8990: Fix top term links from schema browser page to use

          {!term}

          parser

          Show
          jira-bot ASF subversion and git services added a comment - Commit c574a91e3b3b64fd1cb61b0463f3019689f4f4a5 in lucene-solr's branch refs/heads/master from Chris Hostetter (Unused) [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c574a91 ] SOLR-8990 : Fix top term links from schema browser page to use {!term} parser
          Hide
          hossman Hoss Man added a comment -

          Manually correcting fixVersion per Step #S5 of LUCENE-7271

          Show
          hossman Hoss Man added a comment - Manually correcting fixVersion per Step #S5 of LUCENE-7271
          Hide
          steve_rowe Steve Rowe added a comment -

          Reopening to backport to 6.0.1.

          Show
          steve_rowe Steve Rowe added a comment - Reopening to backport to 6.0.1.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 260d26c5959b806cf079650397b91bd631990774 in lucene-solr's branch refs/heads/branch_6_0 from Chris Hostetter
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=260d26c ]

          SOLR-8990: Fix top term links from schema browser page to use

          {!term}

          parser

          Show
          jira-bot ASF subversion and git services added a comment - Commit 260d26c5959b806cf079650397b91bd631990774 in lucene-solr's branch refs/heads/branch_6_0 from Chris Hostetter [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=260d26c ] SOLR-8990 : Fix top term links from schema browser page to use {!term} parser
          Hide
          steve_rowe Steve Rowe added a comment -

          Bulk close issues included in the 6.0.1 release.

          Show
          steve_rowe Steve Rowe added a comment - Bulk close issues included in the 6.0.1 release.
          Hide
          steve_rowe Steve Rowe added a comment -

          Reopening to backport to 5.6 and 5.5.2.

          Show
          steve_rowe Steve Rowe added a comment - Reopening to backport to 5.6 and 5.5.2.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 2c3f42ff1a74e00d65e04a2f3321a2f3625ddf2c in lucene-solr's branch refs/heads/branch_5_5 from Chris Hostetter
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=2c3f42f ]

          SOLR-8990: Fix top term links from schema browser page to use

          {!term}

          parser

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2c3f42ff1a74e00d65e04a2f3321a2f3625ddf2c in lucene-solr's branch refs/heads/branch_5_5 from Chris Hostetter [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=2c3f42f ] SOLR-8990 : Fix top term links from schema browser page to use {!term} parser
          Hide
          arafalov Alexandre Rafalovitch added a comment -

          Is this safe to 're-close'? 5.5.3 is already out.

          Show
          arafalov Alexandre Rafalovitch added a comment - Is this safe to 're-close'? 5.5.3 is already out.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development