10 years ago
2
Topic

Hi there

I purchased Generic Search, but can't find any documentation of how to set it up properly. I have tried to do it logically, as it looks to me, but I can't get it to search in anything but the title.

I need these answered.

1. I have for instance a standard keywords field or a field for suburb, but even when I have added the extra fields in the edit view, there are no results when I search for content I know exist in those fields. It seems search is only done on the title and nothing else.

2. If I want it to search for joomla category names or one of the other fields that uses a multi select for instance, how would I set that up? the #__content table contains the category id, but I need to fetch the names of those categories and then return the value of the category to filter searches.

I do think it's a good idea to have a little tutorial somewhere how to set this up.

Thanks

Get a VIP membership
693 Posts
rpoy
10 years ago
1
Level 1

Hi kalemanzi,

How did you set up your search type?  Did you select your content type when you created the search type or have you made any changes to the CCK item in the Search form?

thanks,

Randy

10 years ago
0
Level 2

Hi Randy

I created a content type, and this search is created under that. 

thanks for response. I believe I sorted number one above out, but still struggle to understand how to do number 2.

My structure is like this. parent category - > provinces categories -> towns categories -> listings of directory content type

If you can explain to me how to write FREE queries, and how to plugin the values of fields in the search form into those queries, then it will help me greatly. I can do this kind of things easily with some js, mysql and php, but I am not sure what is the actual syntax used by SEBLOD to write free queries. 

In the case of a generic search, where I would also like people to search for the town name or province name, I would normally have to join the $__categories id , parent_id and title somewhere on the $__content catid to get the names of categories so I can filter results based on those. 

I also have another search where I want to have a province dropdown and a property type dropdown. The first list will be populated by getting all the categories with a certain parent_id which would be the id of the overall directory. Then the user chooses a province, and then the system must quickly run a query and find all the titles and ids for the categories that have the parent_id of the selected province. From that list, all the returned values must be used to construct the final query where listings will be filtered by catid inside the $__content table. Something like (catid = 99) OR (catid = 100) OR (catid = 101)

So to sum it all up:

HOW do I write custom queries for Search Generic, or CCK field or any other field in SEBLOD. Specifically, how to I plug values in from the fields in the actual search form. (in php I would grab the $_GET['field_name'] and use that in my code that writes the query before running it on the db. )

How to do this in SEBLOD? If you can give an example or two, or point me to some documentation of the correct syntax I would greatly appreciate it.

Thanks.

SEBLOD rocks so far, it's just that I get stuck with things like this and would want to move on

Get a VIP membership