Hi I have been creating a submodule as I figured I could leverage the functionality in the core module of this without editing but it seems after digging further the module is not setup to leverage and input everything from the sub modules? I have based it off the Taxonomy one but I see a lot of taxonomy functions are built into the central module. I just wanted to check that this was the case. If so then I am guessing I would need to update the central module myself as this would not be considered in scope?

My concept is that any field that is added to for example a content type should be able to be used to filter searched more.

I have attached the current version. It is not finished yet.

Comments

omaster’s picture

Issue summary: View changes
StatusFileSize
new5.24 KB
jdanthinne’s picture

Do you mean you'd have to modify custom_search.module itself? Perhaps the custom_search_submit() function, which does all the processing of the inputs before making the search itself?
What I can do is a hook_custom_search_processing perhaps? Could that help you?

omaster’s picture

That is absolutely correct. a hook_custom_search_processing would be absolutely perfect. Just a way to send relevant information to be processed would do the job brilliantly. :).

Let me know if I can help in any way.

jdanthinne’s picture

StatusFileSize
new726 bytes

Here's a patch to add support for a hook_custom_search_processing(&$path,&$keys,$form,$form_state,$delta).
But I'm not sure where you want to hook into, so be free to modify this patch as well.

omaster’s picture

Thanks for the prompt work. I will definitely play around with this during the later half of this week and get back to you with any possible improvements.

omaster’s picture

I will be submitting a patch later today that will allow Apache Solr search to work with this. In the future I will hopefully also get this working with all search methods you have in the Custom Search. It will allow any user to contribute extra modules to extend Custom Search with other items. They will just need to configure their own modules with the right hooks to connect with Custom Search.

jdanthinne’s picture

Great! I was thinking about that for some time, but the upgrade to D8 is already taking me all the free time I can allow for Drupal...

omaster’s picture

Please find attached the patch I have made now for this. I have made the patch on 7.x-1.x. I need to check it still works as I noticed you changed some things but that will probably be my module that will need to change.

omaster’s picture

StatusFileSize
new3.38 KB

Sorry fixed patch file. Other was missing something

omaster’s picture

StatusFileSize
new3.92 KB

I am not sure what the fq in apache solr was about but it doesn't work when that exists. So Here is my final patch Maybe you can explain that?

omaster’s picture

StatusFileSize
new3.32 KB

I have been doing a lot of testing today and found some errors in my patch file I have done a new patch now.

As a side not I am also working on a Date Filter Module now that will also hook into this stuff.

jdanthinne’s picture

I'll wait a few more days so you'll be sure everything is ok with your patch… Come back to me to confirm that and I'll commit.

omaster’s picture

I think this is all good to go now.

The module is available on my sandbox now https://www.drupal.org/sandbox/omaster/2370025

Not quite ready for all fields but it is getting there.

jdanthinne’s picture

Status: Active » Fixed

Ok, pushed to dev…

  • jdanthinne committed e825455 on 7.x-1.x
    [#2365273] by omaster: added some hooks to integrate with new submodules
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.