Skip to content
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

Adding boost number for each fields for edismax query #49

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

kylehuynh205
Copy link
Contributor

@kylehuynh205 kylehuynh205 commented Jun 21, 2024

What does this Pull Request do?

For edismax solr query (https://github.com/Islandora/advanced_search/blob/2.x/src/AdvancedSearchQuery.php#L255-L256) when Advanced Search's request triggered, the list of fields which is passed to qf= (more on this at https://solr.apache.org/guide/solr/latest/query-guide/edismax-query-parser.html)

score random boost_document ss_author ds_changed ds_created itm_edtf_year .....

However there is no boost number which can be configured in Search API Solr index https://sandbox.islandora.ca/admin/config/search/search-api/index/default_solr_index/fields

Screenshot 2024-06-21 at 10 15 03 AM

This PR is add the code to attach the boost number for each field, for example:

ss_author^1 ds_changed^1 ds_created^1 itm_edtf_year^1 sm_field_award_received^1 tm_X3b_en_field_description^8

What's new?

https://github.com/digitalutsc/advanced_search/blob/kylehuynh205-patch-1/src/AdvancedSearchQuery.php#L255-L271

Add missing boost number for each field for edismax search
@kylehuynh205 kylehuynh205 changed the title Adding boost number for each fields for edismax Adding boost number for each fields for edismax query Jun 21, 2024
@kylehuynh205 kylehuynh205 marked this pull request as ready for review June 21, 2024 14:59
Copy link
Member

@rosiel rosiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, and it works (my dismax queries re-ordered themselves and boost-worthy content was boosted.)

@rosiel rosiel merged commit bc7c2f6 into Islandora:2.x Jul 3, 2024
@kylehuynh205 kylehuynh205 deleted the kylehuynh205-patch-1 branch July 5, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants