Closed (outdated)
Project:
Custom Search
Version:
7.x-1.13
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 May 2010 at 20:26 UTC
Updated:
9 May 2025 at 19:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jdanthinne commentedIf a content type is selected, it will search only for node in this content type.
If "Any" is selected, it will search for node without a particular content type (regular search).
The dropdown list is just a selector, and not a restrictor when using "Any".
BUT that's a good question/remark... that made me think perhaps I should add settings to exclude some content types from the search and/or the ability the leave the "Any" field blank, so the user would have to choose which content type to search.
What do you think?
Comment #2
fehin commentedI think it would be nice to have the option of "Any" and not force the person to choose. Setting a search block up to search within specific content types or taxonomy means we want people to be able to search within all the specified block settings or select one to search in. I won't advise forcing users to pick, they should have the option to search by "Any" and get result based on only the specified block search setup or pick an option from the dropdown list.
Comment #3
jdanthinne commentedComment #4
fehin commentedHi, have you decided what to do with this? Using myself and my friends as examples, people generally first search without picking an option from the list then if there is a lot of result, they select and option from the select list to filter the result. So it's is important that "Any" is restricted to the search configuration chosen by admin.
Comment #5
jdanthinne commentedHi, I've decided to implement those settings, but it needs some work, and I'm pretty busy these days (I'm working full time for a webdesign company, so I can only do that on free time).
I'll update this issue as soon as I've done the work. Sorry for the delay.
Comment #6
jdanthinne commentedJust commited the changes to DEV. Please review.
There's a new checkbox in the Custom Search / Content settings (and per block as well) where you can choose the behaviour of -Any-. (check it in your case)
Comment #7
fehin commentedThank you for making the change. I installed the dev version but I couldn't find the check box. Where is it situated and what does it say?
Comment #8
jdanthinne commentedIt's in /admin/settings/custom_search/content.
The last checkbox on the page ("Choosing -Any- restricts the search to the selected content types.")
Comment #9
fehin commentedThis is not showing in mine. Please see attached image which shows the bottom of my "admin/settings/custom_search/content" page. Also would this only be available for contents and not taxonomy?
Comment #10
jdanthinne commentedAre you sure you have the latest dev version? Re-download it please.
See my screenshot.
Comment #11
fehin commentedI downloaded it again and tested it and it works. Thank you.
Would you please also make this option available for the taxonomies?
Comment #12
jdanthinne commentedI don't understand the point of making this option for taxonomy. For the content types, ok, because you can choose which types to include in the selector, but for the taxonomy, you can't choose the terms. -Any- would search for nodes with all terms??
Comment #13
fehin commentedThe reason I asked you to add the function to the taxonomies is because the problem is the same. If the dafault "Any", in my case "catalog" is chosen, the result includes all matching values from the whole site not just within the taxonomy setting for the block.
Comment #14
jdanthinne commentedI think it's impossible to do (but correct me if I'm wrong or send me a link to a page where you want to do that)
Let's think that there's 2 taxonomy selectors, and they are both set to -Any-, how can I know the results to display? All nodes with taxonomy 1 or all with taxonomy 2?
Comment #15
jdanthinne commentedComment #16
subhojit777Opening this issue again. I have a custom search block where in settings I have specified three content types to be shown in search results. I have also checked the checkbox Choosing -Any- restricts the search to the selected content types. But it is not working. If I select - any - and search, it is searching in all content types, I guess this is not the expected behavior. If I select a particular type in the select list then it is searching for that content type, this is working as expected.
I am using apachesolr 7.x-1.4 and facetapi 7.x-1.3 modules
Comment #17
jdanthinne commentedI've pushed some changes to the DEV version, sending the correct restricted content types to apachesolr: http://drupalcode.org/project/custom_search.git/commit/eb31739
Please test and review.
Comment #18
loon commented