[ic] Coordinated searches over multiple fields

Mike Heins interchange-users@interchange.redhat.com
Wed Apr 10 07:45:01 2002


Quoting Mathew Jones (mat@booksellersolutions.com):
> I am trying to constuct a coordinated search in the following way:
> 
> <input type=hidden name=fi value=products>
> <input type=hidden name=st value=db>
> <input type=hidden name=co value=1>
> <input type=hidden name=tf value=title>
> <input type=hidden name=to value=f>
> <input type=hidden name=em value=0>
> <input type=hidden name=ac value=1>
> 
> <input type=hidden name=sf value="price">
> <input type=hidden name=se value="0.00">
> <input type=hidden name=op value="ne">
> <input type=hidden name=nu value="0">
> 
> <INPUT type=hidden name=sf value=":*">
> <INPUT type=text size=25 name=se value="">
> <input type=hidden name=op value="rm">
> <input type=hidden name=nu value="0">
> 
> When a single word is searched for, the search finds everything in the 
> database that contains the search word, that does not have a price of 
> 0.00. My problem is when two words are searched for. What I would like 
> is for the results to contain all records which contain BOTH words 
> anywhere in the record, and does not have a price of 0.00. Right now it 
> only returns results which contain both words next to each other with a 
> price of 0.00.

Can't really do that right now. I suppose we could and another match
type -- I hadn't really thought about it. It could be something like
"am", for "any match".

A better approach on all this might be to not use a coordinated search
and just use the word matching text search, which does what you
want. Eliminate the 0.00 items another way.

One way would be to create an index file and use mv_dict_look=0.01
as a qualifier. Another way would be to use mv_like_spec and 
make that equal to 0.00.

> Also,  I would like the search to ignore punctuation, therefore if 
> someone types "Amys" it matches "Amy's" in the database.
> 

Hmm. That is much harder as it requires modifying the data. Probably not
much that can be done there, and I think the benefit would not be worth
the work. Not many people would do that anyway, or at least I hope not.

All in all, probably the best technical feature I could add to help
in situations like this is a "cascaded search". That would allow a
SQL query or other IC search to create a set of records which would
then be operated on by another independent search.

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Few blame themselves until they have exhausted all other possibilities.
 -- anonymous