solr icon indicating copy to clipboard operation
solr copied to clipboard

Add hl.queryFieldPattern input to Admin UI

Open jeanielamwh opened this issue 3 years ago • 11 comments
trafficstars

no-JIRA-yet building upon https://issues.apache.org/jira/browse/SOLR-16111 changes

Description

Add a text input for hl.queryFieldPattern which was introduced in #757

Screenshot 2022-03-28 at 12 46 59

Solution

Add a label and text input inside the hl fieldset.

Tests

  • Build without commits in #757, run the UI, check the text input are sending the correct hl.queryFieldPattern by looking at the responseHeader.
  • Build with the commits in #757, run the UI, check the text input are sending the correct hl.queryFieldPattern, and we are getting the intended behavior from #757.

Checklist

Please review the following and check all that apply:

  • [X] I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • [X] I have created a Jira issue and added the issue ID to my pull request title.
  • [X] I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • [X] I have developed this patch against the main branch.
  • [X] I have run ./gradlew check.
  • [ ] I have added tests for my changes.
  • [ ] I have added documentation for the Reference Guide

jeanielamwh avatar Mar 28 '22 12:03 jeanielamwh

There are a ton of parameters for Solr and this is obscure. Are you sure we should load up the Admin UI for these? I think not.

dsmiley avatar Mar 31 '22 23:03 dsmiley

Via https://github.com/apache/solr/pull/757#discussion_r836881993 it was highlighted (no pun intended) that hl.queryFieldPattern is ignored if hl.requireFieldMatch=true is set. So then if (and that remains an if) the Admin UI had the hl.queryFieldPattern option, should it only be showing it if hl.requireFieldMatch is unchecked?

w.r.t. more obscure parameters not shown on the Admin UI, I wonder -- outside the scope of this pull request or SOLR-16111 -- if there might be an opportunity to (somehow) point into the reference guide more e.g.

  • hl to https://solr.apache.org/guide/8_11/highlighting.html
  • facet to https://solr.apache.org/guide/8_11/faceting.html
  • spatial to https://solr.apache.org/guide/8_11/spatial-search.html
  • spellcheck to https://solr.apache.org/guide/8_11/spell-checking.html

Or maybe that would add information overload too (and be relatively obvious)? And there's general Documentation and Solr Query Syntax links already.

Would love to also hear @epugh's thoughts on this.

cpoerschke avatar Apr 04 '22 16:04 cpoerschke

Hi @jeanielamwh, thanks for opening this pull request!

Just FYI that I'm going to edit the title and description to remove the direct SOLR-16111 reference (now that #757 is merged) so that the https://issues.apache.org/jira/browse/SOLR-16111 ticket can be closed (so easy to forget about that later otherwise).

When there is more consensus here about making the Admin UI changes then a new JIRA ticket could be created to continue.

Hope that works for you and everyone.

cpoerschke avatar Apr 08 '22 16:04 cpoerschke

The direction that we've been going in the admin UI has been to add parameters, and we haven't been trying to think through "Which are the important ones".... Partly because we've added the parameters on a 1 by 1 basis!

One UX that we do have is some drop downs for "advanced", for example on the Collection Creation UI: image

We also do collapse/open parameters on the Query UI, like for spatial and faceting checkboxes.

I'd be interested in seeing what the Query UI would look like if we actually exposed all the Common parameters, and introduced new check boxes for Unified, Original, and FastVector.... I'm supposing that the logic in the Query Admin UI would pretty much all be pretty boilerplate to do all of that.

As an aside, it appears this parameter, hl.queryFieldPattern is not documented in the Ref Guide: https://solr.apache.org/guide/solr/latest/query-guide/highlighting.html It probably should be there before adding it to the Admin ;-)

epugh avatar Aug 17 '22 11:08 epugh

Sounds good. It is document but it hasn't been released: https://github.com/apache/solr/blob/96c1577987412004b5df653bdebe2eb1d470e624/solr/solr-ref-guide/modules/query-guide/pages/highlighting.adoc#L119

dsmiley avatar Aug 23 '22 22:08 dsmiley

Sounds good. It is document but it hasn't been released:

https://github.com/apache/solr/blob/96c1577987412004b5df653bdebe2eb1d470e624/solr/solr-ref-guide/modules/query-guide/pages/highlighting.adoc#L119

Oh awesome, I should have thought to check the unreleased docs!

epugh avatar Aug 23 '22 22:08 epugh

@cpoerschke I think with David's comment, we could go ahead and add a new jira and maybe try out the whole "advanced" pane in the Query UI? Is that something you want to take on? If not, if you create the JIRA, I'll take on the JavaScript work ;-)

epugh avatar Aug 23 '22 22:08 epugh

Hi @epugh, thanks for the input! If you don't mind may I help with creating the JIRA? I'll also be happy to take on the JavaSciprt work

jeanielamwh avatar Sep 07 '22 17:09 jeanielamwh

awesome @jeanielamwh I would love that. Drop me a note if you have any challenges creating the JIRA, and if so, I can help you ;-)

epugh avatar Sep 07 '22 17:09 epugh

Created SOLR-16409 based on @epugh's suggestions.

jeanielamwh avatar Sep 13 '22 19:09 jeanielamwh

Once you get your PR done for SOLR-16409, then maybe this PR can be closed in favour of the more general solution!

epugh avatar Sep 13 '22 19:09 epugh

Closed in favor of #1067

jeanielamwh avatar Oct 11 '22 18:10 jeanielamwh