Closed (fixed)
Project:
Finder
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2009 at 20:28 UTC
Updated:
22 Sep 2009 at 13:30 UTC
Jump to comment: Most recent
It would be nice to be able to say ANF to search, for example, in the title AND/OR the body (or any other two fields).
Is/will it be implemented?
Since it doesn't seem to be possible at the moment, I'm posting this issue as a feature request (and not as a support one).
Thanks and congrats for your work.
Comments
Comment #1
danielb commentedYeah I've been thinking about this too. It will be a more costly operation with multiple fields to search, but there is no reason I should prevent it by design.
Comment #2
codenamerhubarb commentedI agree. The ability to search in more than one CCK field would be fantastic. This is a great module and thanks for your hard work danielb.
Comment #3
danielb commentedHmm I did some work on this and it turns out if you allow multiple fields to be searched you are stuck with extra processing whether you use the option or not. So I will extract this functionality and implement it in a seperate module.
Comment #4
codenamerhubarb commentedThat'd be awesome.
Comment #5
danielb commentedHmm I'm still not sure how to go about this, but I will consider it in the Finder module.
Comment #6
danielb commentedI just figured out how I'm going to do this, I'm excited, but there's a bit of work to do...
Comment #7
dsms commentedI would like to see this feature too. if you need any help with coding or if you need ideas how to solve this, feel free to contact me.
basically you just need to find a way to easily build the SQL-Query by Joining the tables together and extending the
'WHERE' part, just like Views it does.
Maybe there are already code-pieces in Views that solves exactly your problem!
Comment #8
danielb commentedWell that's not really the problem, finder can already query multiple fields with one query either using it's own query builder or the views API, but if you've only got one form field to put that data into - what exactly do you do? I think this part of it will be a bit inefficient whether we like it or not, because there will need to be another check of the returned fields to see which one met the matching criteria.
Is there SQL for "only select the field that meets it's 'where' condition"? If there is I don't know about it.
Comment #9
danielb commentedJust an update, I have spent some time implementing this but I keep running into problem after problem, I can't guarantee I'll deliver on this, but I'm having a go.
Comment #10
feuillet commentedsubscribing here.
Comment #11
pribeh commentedsubscribing.
Comment #12
murokoma commentedSubscribing. Important issue I think.
Comment #13
danielb commentedI have got this working for autocompletes and nodes on my copy, more work has to be done to get it working for users/views/optionwidgets and even the results page. But at least now I have bits and pieces of code to handle the extra functionality that I can use to do the rest.
Might also need to redesign the queries to use aliases now that it may be possible to pick two fields from different tables with the same name and blow the whole thing up.
Anyways this is why I'm not really solving the other issues atm.
Comment #14
Anonymous (not verified) commentedWell thanks for working on it anyway! Sounds good so far.. as long as you don't forget the autocomplete issues ;)
So I'm subscribing to this too.
Comment #15
junro commentedsubscribe
I need this to use this very good module. :)
Comment #16
danielb commentedlooks to be working, I'll put it up as a DEV version as there may be some kinks to iron out yet
Comment #17
junro commentedHello, I just updated to the dev. version of today in order to search in two or more fields.
I'm using the view finder type and my view is set to use 4 nodes type.
After searching something, I've got this in a popup of ma navigator:
in the results page, i've got:
warning: Invalid argument supplied for foreach() in /home/pariscin/www/sites/all/modules/finder/modules/finder_views/finder_views.module on line 331.
I have this errors even if I'm using Finder with only one field.
Comment #18
danielb commentedplease start a new issue if you find anything i've missed
Comment #19
junro commentedHere the new issue #571510: Errors with 8 Sept dev version with new feature: Searching in two or more fields :)