-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Root-198: Autocomplete #77
Root-198: Autocomplete #77
Conversation
…for-the-form # Conflicts: # search_api_federated_solr.module
The form values had not been set yet, so I used the configuration values which is what the form is doing down the codebase. I also set defaults in case it isn't found. I'm not sure how to test this on the app yet and I reached out for more information.
Note: this affects neither their form state value nor config structure
…on search app config
Good call with enable autocomplete form input! Looking at the styles now. |
Also check to see that you don't have this error
I've been swapping versions and it may be unrelated. |
@agentrickard updated the styles in the custom module: See demo site PR: palantirnet/federated-search-demo#21 |
@agentrickard I do see that notice in my recent log messages. I see #43 which a) appears to address this and b) provided the approach taken in my branch with the exception of removing the offending code. I'd like to merge this branch in to mine and rebuild, retest, and confirm the messages no longer occur. |
- make autocomplete enable checkbox label clickable - open/close autocomplete details based on dis/enabled - make enable checkbox trigger for other form values, not whole details
…ements Fixes bug where all of the sudden the block config enable autocomplete value was not being honored
…lock-autocomplete ROOT-198 block search form autocomplete
'Enable autocomplete for the search results page search form' checkbox appears twice -- once in the fieldset and once outside it. |
thanks @agentrickard, not sure how i missed that... on it |
@agentrickard the first checkbox should be removed now and the autocomplete fieldset should always be visible now. It should be expanded when the page load if it it's enabled. And enabling should reveal the rest of the autocomplete options. |
@agentrickard is on a plane but agreed this is ready to move forward, merging! |
This PR adds search app + block config for autocomplete + hidden facet/filters. It also adds fieldsets to the search app config form for a better UX.
To Test
Reprovision your vm
root-198-search-terms-field
in thefederated-search-demo
repoConfirm you're able to provision the machine with updated solr config
exit
and runvagrant provision
or boot your vm if it is not already withvagrant up --provision
solrconfig_extra.xml
has been copied by ssh'ing into the vm, and runningvim /var/solr/drupal8/conf/solrconfig_extra.xml
./tm_render
then pressENTER
which should execute a search and bring you to the line defining default query fields:<str name="qf">tm_rendered_item tem_full_text_title tem_search_terms</str>
which did not exist prior to this PR.:q!
to exit vimConfirm you're able to build all of the sites successfully
phing build install-all
(this should take a few minutes to complete)Initialize module repos + set
search_api_federated_solr
phing init
search_api_federated_solr
for the changes in this PR (autocomplete config, hide facet/filter values, field sets)cd src/search_api_federated_solr
features/d8/root-198-autocomplete-config
Add federated terms to the Recipe Category terms
drush @fsd-d8.local uli
Recipe Category>Accompaniment
Recipe Category>Dessert
Recipe Category>Main Course
Recipe Category>Snack
Recipe Category>Starter
Re-index site content (to add federated terms)
Confirm you can successfully search from the solr admin without entering in
tm_rendered_item:
before your term in the common > q fieldConfirm you can see federated terms in the index now
veg
in the common > q fieldSuper easy vegetarian pasta bake
has federated termsConfirm that the title boost is honored
car
debugQuery
box and re-execute your searchdebug.explain
section and observe the boost resultsConfirm the search terms boost is honored
past
Super easy vegetarian pasta bake
pastry
to thesearch terms
fieldpast
againDeep mediterranean quiche
appears first because of the search term boost which is higher than title, which is higher than rendered_itemConfigure autocomplete in the Search app
SEARCH RESULTS PAGE > SEARCH FORM > AUTOCOMPLETE
fieldset appears at the bottom of the pageSEARCH RESULTS PAGE > FACETS & FILTERS
fieldsetSet the "Site name" facet to this site
option remainsHIDE FACETS / FILTERS FROM SIDEBAR
/search-app
-- remember the default site name will value will not be set if you simply browse to this, but it will if you search from the search form)Configure the search block with autocomplete functionality
/select
handler) and the view (see updated README for context)To test the install config (including the view)
This felt a bit hacky but it also worked, I think
drush @fsd-d8.local pmu -y search_api_federated_solr
config/sites/d8
:search_api_federated_solr
module in core.extensionsdrush @fsd-d8.local cim -y
drush @fsd-d8.local en -y search_api_federated_solr
Set the block autocomplete up to work with the view