I have a problem when searching my catalog.It has an index called "Author" which holds the name of a person who wrote a document.when i search the catalog for say "paul dunbar",i will get documents from authors like "paul" or "paul test" as well as paul dunbar.what i want to do is limit the matches to "paul dunbar".i don't know python so i need to use a dtml method. what i have tried is to accept all the matches but before i output them on the screen,i check to see if the author name the user entered to search is the same as the one in the current item.this always fails because i am not sure how to compare the strings against one another.when i print both variables i.e the catalog one and the user one,the user one would be "paul dunbar" but the catalog would be ['paul dunbar'] so they don't match.any help would be appreciated, paul dunbar. _____________________________________ Get your free E-mail at http://www.ireland.com
paul dunbar writes:
I have a problem when searching my catalog.It has an index called "Author" which holds the name of a person who wrote a document.when i search the catalog for say "paul dunbar",i will get documents from authors like "paul" or "paul test" as well as paul dunbar.what i want to do is limit the matches to "paul dunbar".... Missing operators between search times are "replaced" by the default operator ("or"; in Zope 2.4, you can define "and" as default operator).
To get almost what you want, enclose "paul dunbar" in quotes. This will make a phrase search, quite near to a search for "paul dunbar"... Dieter
participants (2)
-
Dieter Maurer -
paul dunbar