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

Explore "Weightable" class #2812

Open
oscarssanchez opened this issue May 31, 2022 · 5 comments
Open

Explore "Weightable" class #2812

oscarssanchez opened this issue May 31, 2022 · 5 comments
Labels
enhancement module:weighting Issues related to the weighting engine

Comments

@oscarssanchez
Copy link
Contributor

Is your enhancement related to a problem? Please describe.

Describe the solution you'd like

Currently, fields that can be weighted are limited to post types. Since ElasticSearch offers weighting across different fields, such as date, index, etc, offering a way to add new weights outside of the standard way we have now would be good.

Designs

Describe alternatives you've considered

Additional context

@felipeelia felipeelia added the module:weighting Issues related to the weighting engine label Jun 2, 2022
@Jeetshahcl
Copy link

How to put weightage i tried but its not on wp_query can you please help me on this

@Jeetshahcl
Copy link

@felipeelia please help me i am stuck.

@nickchomey
Copy link
Contributor

nickchomey commented Aug 19, 2022

@oscarssanchez I am making good progress on the BuddyPress Integration (#3) and would like to add metaboxes to the Search Fields and Weightings feature in order to be able to tweak things from the GUI. But unfortunately there aren't any filters/mechanisms for this yet.

I'd be happy to work on this if you can give me some direction on how you'd like for it to be done.

I'm thinking that it would be best to

  1. leave the Posts-related stuff in Weightings.php alone, for simplicity's sake
  2. Add something like abstract public function render_settings_section(); to Feature.php, and then a corresponding function in each of the Features' extended class to do whatever is necessary to generate the settings section for their respective Indexables (I've got many for the singular BP Feature - activity post, forum posts, groups, etc...).
  3. Finally add some minimal code in the Weightings.php render_settings_page() function to just grab an array of the active Features, and then loop through each Feature's respective render_settings_section() function to retrieve/echo the content.

I don't really want to start on such an effort without some assurance that it'll actually get used/merged, which will surely require that I adhere to your/10up's standards. So, I hope you'll be able to provide some guidance on the above. What do you think?

@nickchomey
Copy link
Contributor

I see this PR #2588 that might be related, but it isn't at all clear to me what it does given the lack of explanation/details...

@nickchomey
Copy link
Contributor

@oscarssanchez I wonder if this should be related with the call to action in the 4.3 release for ideas for Facets enhancements? We should be able to both extend the Custom Fields and Weights feature and then use those in Facets as well. Again, I'm eager to contribute to this - I just need to be pointed in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement module:weighting Issues related to the weighting engine
Projects
None yet
Development

No branches or pull requests

4 participants