Kevin wrote: >First, are you wanting to search for a field that has a >cross-reference created? If so, then FIND^DIC is right for you. If >you are wanting a more complex search, you will need to write custom >code to do the search. > >If you specify more than one cross-reference, then it will not just >search for the .01 field. It will search for whatever fields the >cross-references cover. > >I have been agitating for a full-featured brute-force (i.e. not based >on cross-references) searching functionality for some time. But I >have been distracted and haven't done it myself (yet).
Kevin, I think you greatly underestimate the difficulty of providing a general search functionality that is easy to use and fast enough to be useful on large and complex "live" data bases. Then again, it is said that an advantage of youth is in not knowing that a thing is impossible until after you have done it. ;) The difficulty is in satisfying all three objectives at the same time (or up to seven depending on how you count [general, easy, fast, useful, large, complex, live]). Brute force searches can be painfully slow, so I think that the general philosophy is (has been) that routine queries should always be based on cross references for ease of use, efficiency, and speed. Cross references are easy to add and maintain where the data is updated by the API's. I actually contributed a re-worked Fileman search module many years ago so that it could search on data elements in multiple fields using the concepts of predicate calculus. Up to that time, searching on conditions based on data fields in related hierarchies was essentially useless. As I recall, the problem I was working on at the time (25 years ago?) was retrieval of pathology diagnoses stored as a multiple of diagnoses with multiple morphologies, etiologies, and topologies and each with multiple modifiers. >The M2Web code base has code for an iterater that will cycle through all >records, to which a comparison code could be attached to generate a search. The iterator that Kevin mentions is a general low level tool for programmers that makes it easy to iterate efficiently over MUMPS global structures (like the ones used by Fileman for storing both data files and cross references) while working with the higher level abstraction of data files and fields rather than piece positions of sub-nodes of the stored form of the data records. It represents a simplified abstraction for flexible bidirectional traversal of complex virtual hierarchies of MUMPS global structures. It replaces what would otherwise be an open ended nesting of FOR command loops with a single FOR command - with the additional possibility of stopping at any point and saving its place and resuming the traversal at a later date, possibly with a reversal of direction if desired. The iteration objects are self-contained as local arrays so they (not just the iteration spec) can be saved and restored with a MERGE command It is a building block that works best in combination with other tools that abstract other features of Fileman-like databases and user interfaces. The query feature in M2Web uses the iterator with saved iteration specifiers that can be called by name and with interface and content type independent data formatting specs. You can see some live examples and discussion at http://vista.vmth.ucdavis.edu or at http://openforum.worldvista.org/~forum/m.cgi --------------------------------------- Jim Self Systems Architect, Lead Developer VMTH Computer Services, UC Davis (http://www.vmth.ucdavis.edu/us/jaself) (http://vista.vmth.ucdavis.edu/) (http://openforum.worldvista.org/~forum/m.cgi) ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members