PDA

View Full Version : Logical Search Combine And Or


thegman
06-16-2008, 06:43 PM
Hi
Could you please confirm if it is possible to-

configure a PHP search with a hidden value as a "must contain" & have a search text box for the usual any word search.

(hidden = xxxdept2xxx, zoom_query = my search text)
would only return results that contain xxxdept2xxx, but would search "my, &/or search, &/or text" within those.

Thus, I would be able to dynamically manage department/category searches by specifying the department/category in the hidden field & a normal search box for the client.

I am aware that you have a category option, but this needs managing within the zoom GUI. (I appreciate that there is an import option, but this still causes me automation & dynamcy issues.)
Thanks. (happy to work on a PHP mod, if you could suggest a route.)

wrensoft
06-16-2008, 11:39 PM
Yes you can select the category via a hidden field.

This past post on default category selection (http://www.wrensoft.com/forum/showthread.php?t=1947) covers the issue in V5 and this one for V4 (http://www.wrensoft.com/forum/showthread.php?t=1666) of the software.

thegman
06-17-2008, 10:13 AM
Hi
So that will be a NO then.:(

I was asking if there was a way to append an additional hidden search term that is a "must match", WITHOUT using the Category feature?
This would be looking for a "must match" within existing indexed data, but still allowing and/or matches for the user entered search terms that it is appended to.

Problems with using Category facility for me are:-
Requires GUI/human intervention to update & maintain.
Very difficult to handle Category/Directory tree - (Category, sub, categories, & sub sub categories.)

Unless you can tell me there is a command switch to update categories via import.
&
That the categories option will support wildcard, so that I can use strings that start at top Department/directory level & work down. ("CAT1CAT5CAT7CAT9").
Thus I could search
CAT1*
or
CAT1CAT5CAT7*
etc.

wrensoft
06-17-2008, 11:33 AM
You say categories are no good because you need to manually create and maintain your categories. But aren't you just moving the problem rather than solving it. With your proposal you will need to maintain key words in all documents, and every time you move or create a document you need to do additional manual work to set the key words correctly? Plus this needs to be done in code, rather than in a more friendly GUI.

Having said that you can create Zoom configuration files programatically. We provide the config file spec (http://www.wrensoft.com/zoomsdk/index.html) if you needed it. The config file contains the list of categories.

You can also search for multiple categories via a hidden field or normal HTML form, but this is done with a boolean OR across the categories.

It would also be a fairly simple job to write some Javascript to take the input from the forum and tac on an additional word to the search string before calling the search script. This would give a result close to what you are after.

thegman
06-17-2008, 01:04 PM
Hi
Thanks for coming back on that.
Re the first bit.
AH, you are assuming that I am maunually creating and maintaining documents. Not so!!
These are programatically generated & maintained.
Thus, maybe my request will now make more sense to you.
I will play with the Category then & see how I get on.
I am not familliar with syntax for working with boolean OR, but will search around on that.

Re the config file spec, is that only available via the SDK at additional cost?

Ray
06-18-2008, 01:34 AM
Re the config file spec, is that only available via the SDK at additional cost?

Yes.

As mentioned, there are several ways you can go about this. The other possibilities include adding Javascript to append search words to the query, or even modifying the search script to accept additional parameters. All of this requires custom development. It is a pretty obscure/exclusive requirement so unlikely to be supported by an existing feature.

thegman
06-18-2008, 11:27 AM
Ray
Thanks for the confirmation re the SDK.
I think I have cracked this anyway now with some script modding & using, of all things, the Author field.
I have had to adopt a workaround with a duplicate set of local documents for indexing, that are generated in parallel, to satisfy Zoom.
But this is no big issue, as previously mentioned, these are machine generated anyway.
Thanks again.