I have done the requisite searches and cannot find any reference to this problem. So it must be something I'm overlooking. I want to search for properties that have a certain number in them, that are stored as strings. Such as zipcode or date of birth (there are reasons why we don't use a date object) or any other sequence of digits. I specified in the catalog that I wanted a Textfield index for these. In the search form I specify the input with the :string type. I would have assumed that these would work just like Last Name and First Name work (which BTW work fine). But the numeric strings never find a match even though the properties exist with the data in them and the objects are registered in the catalog. Example: (folderish ZClass object) Ann Jackson with a DOB of 1960/01/01 I can find her with a* in the first_name I can find her with j* in the last_name I cannot find her with 1960* or for that matter 1960/01/01 in the dob. Any clues here? -- Tim Cook, President -- Free Practice Management,Inc. | http://www.FreePM.com Office: (901) 884-4126 "Nearly everyone will lie to you given the right circumstances." - Bill Clinton
Tim Cook wrote:
I specified in the catalog that I wanted a Textfield index for these. In the search form I specify the input with the :string type. I would have assumed that these would work just like Last Name and First Name work (which BTW work fine). But the numeric strings never find a match even though the properties exist with the data in them and the objects are registered in the catalog.
Your problem may be the use of Text Indices. These use the voabulary, which handily strips out digits when indexing :-( The way to get around it would be to use a Field Index...
Example: (folderish ZClass object) Ann Jackson with a DOB of 1960/01/01
I can find her with a* in the first_name I can find her with j* in the last_name I cannot find her with 1960* or for that matter 1960/01/01 in the dob.
...of course, then you can't use globbing matches like that, so there's no real solution :-( Can only suggest mailing Chris P and asking him, as he was last to do some serious routing in the Catalog code...
Any clues here?
Sorry I couldn't be more help... Chris
Just to clarify. Chris W's comment that the vocabulary strips out the digits. It seems to only do so when there is no other characters adjacent in the property. If there are alphabetic characters but separated by whitespace it will remove the digits. If they are separated by a hyphen it will not remove the digits but will remove the hyphen. Also in my case of the DOB it removes the '/' separating the elements. So, my kludge until something better comes along will be to store a character on the frontend of the string. Strip it off before display. Add it to the element for searching. Better ideas? -- Tim Cook, President -- Free Practice Management,Inc. | http://www.FreePM.com Office: (901) 884-4126 "Nearly everyone will lie to you given the right circumstances." - Bill Clinton
participants (2)
-
Chris Withers -
Tim Cook