[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] Fast binary searching
****** message to minivend-users from "B.J. Bezemer" <bas.bezemer@wxs.nl> ******
Hi All,
I'm having a hard time to get the fast binary search option to do what I want it
to do. It needs to return results on exact matches and ignore matches of
substrings. I'm using mvend 3.14-5.
There is an index file that lists the category an artikel belongs
to followed by the artikel code. The content might reveal that I'm into the
aquatic plants business. A shortened list:
category code
aquarium:accessories X505
aquarium:books X601
aquarium:books:cdrom X501
aquarium:medicine J60159
aquarium:medicine J60155
aquarium:plants A1
aquarium:plants:anubias A9
aquarium:plants:aponogeton A18
aquarium:plants:cryptocoryne A50
aquarium:plants:echinodorus A75
marine:accessories:meters X711
pond:accessories X504
With an in-page search the results must be extracted from the above list
(stored in the file products/category.index). A simplified presentation:
[search-region arg='mp=category']
<table>
[search-list]
<tr>
<td>[item-code]</td><td>[item-field description]</td>
</tr>
[/search-list]
</table>
[/search-region]
Definition of the search profile where [value searchcategory] has been set
already to define the search string.
[set name=category]
mv_dict_look=[value searchcategory]
rf=1
ml=16
fi=products/category.index
sp=@@MV_PAGE@@
[/set]
I've been playing with the definition of di=-1 and mv_dict_end in the search
profile but I don't have a clue on how it will affect the results.
What's the problem?
If mv_dict_look is set to "aquarium:plants" I want it to return artikel "A1"
only and not the subcategories "anubias", "aponogeton" etc. The same holds for
"aquarium:books" which should return "X601" and not "X501". Can someone help me
out how this can be achieved, preferably with the dict_look related options.
Regards,
Bas Bezemer
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list