Re: [Zope] Numeric Entries in Catalog Search
Dieter Maurer wrote: > > Tim Cook writes: > > ... search for numbers in ZCatalog's text indices ... > Recently, someone has posted a splitter.c patch that > prevents it to discard numeric words. > Ah yes. I recall the spliter.c thread. I didn't pay attention at the time I guess. Thanks, -- 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 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Numeric Entries in Catalog Search
Alberto Berti wrote: > > Tim Cook wrote: > > > 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. > > And you can't do the same work with the value in the search form? e.g. > i you are searching against 1960/03/* why you don't strip the '/' > character before passing the value to the catalog for the search? so u > do effectively a search against '196003*'. Maybe this can work... Actually, I was incorrect. It doesn't strip the slashes. But that's not the issue. The problem is that if you enter digits into a string property they don't get entered into a globbing vocabulary. They must have either a character appended or prepended to the string of digits to prevent them from being stripped. -- 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 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Numeric Entries in Catalog Search
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 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Numeric Entries in Catalog Search
Chris Withers wrote: > Your problem may be the use of Text Indices. These use the voabulary, which > handily strips out digits when indexing :-( I did not know that. > The way to get around it would be to use a Field Index... > ...of course, then you can't use globbing matches like that, so there's no real > solution :-( Yeah, the globbing vocab. is pretty necessary. " Keyword Indexes index a sequence of objects that act as 'keywords' for an object. A Keyword Index will return any objects that have one or more keywords specified in a search query." Does this mean you have to specify (where) what the predetermined keywords are? > 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... Thanks for the info. -- 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 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Numeric Entries in Catalog Search
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 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Numeric Entries in Catalog Search
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 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )