Search with custom fields module

Emil-AC
Emil-AC's picture

Joined: 2013-03-21
Posts: 7
Posted: Mon, 2013-03-25 20:23

I'm trying to use the custom fields module with it's search feature. It seems that it needs search strings with at least four characters to work. Can I change this to three characters? Where?

Thanks for reading, Emil

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2013-03-25 20:33
 
Emil-AC
Emil-AC's picture

Joined: 2013-03-21
Posts: 7
Posted: Mon, 2013-03-25 21:27

Thank you Dave for your answer. This perfectly works with standard search module but it doesn't seem to work with the search function of the custom fields module.

Emil

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2013-03-25 22:25

I think the custom fields module replaces the stock search, don't know never used it much. You will have to port to changed code or get a dev to work on that for you.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Tue, 2013-03-26 00:44

Emil-AC: I won't really have time to look at this for a while, but, for clarification, are you saying that (1) The short_search_fix is entirely ignored when you have custom_fields enabled, or that (2) When using both, the short_search_fix works on the standard fields but doesn't also apply to the custom fields?

 
Emil-AC
Emil-AC's picture

Joined: 2013-03-21
Posts: 7
Posted: Tue, 2013-03-26 09:36

I don't really use the custom fields currently because I'm brand new to G3. But custom fields are one of the main reasons to choose G3 and I do have plans to use them. So after installing G3 I almost immediately disabled the build in search module and installed the custom fields module that comes with it's own search function ... then I realized that the search function of the custom fields doesn't search for tags with just three characters. After installing (and enabling) the short_search_fix module I found that it wouldn't fix my problem. So I disabled the custom fields module and enabled the search module again. Than I found that a search for short tags works.

Conclusion: short_search_fix works with the search module but not with the search function that comes with the custom fields module.

Thanks for reading, Emil

BTW. When using the search function of the custom fields module an empty search string ('') returns all items of the whole gallery. Be aware that G3 is rather new to me and that some of the implied assumptions of mine may indeed be wrong!

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Wed, 2013-04-03 22:58

@Emil-AC: I'm just really looking at what custom_fields does to search. As @floridave already stated, it's an entirely different search being used. At present, you'd have to directly edit the search code of the module. I'm looking for a simpler solution (for different reasons), but it's not a simple fix outside of the direct edit. You could also just post a request in the paid services forum: http://galleryproject.org/forum/65