solr
solr copied to clipboard
Add hl.queryFieldPattern input to Admin UI
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

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.queryFieldPatternby 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
mainbranch. - [X] I have run
./gradlew check. - [ ] I have added tests for my changes.
- [ ] I have added documentation for the Reference Guide
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.
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.
hlto https://solr.apache.org/guide/8_11/highlighting.htmlfacetto https://solr.apache.org/guide/8_11/faceting.htmlspatialto https://solr.apache.org/guide/8_11/spatial-search.htmlspellcheckto 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.
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.
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:

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 ;-)
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
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!
@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 ;-)
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
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 ;-)
Created SOLR-16409 based on @epugh's suggestions.
Once you get your PR done for SOLR-16409, then maybe this PR can be closed in favour of the more general solution!
Closed in favor of #1067