Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner I reindex the catalog and it found 17 objects for Owner But if I make a search for Owner ZCatalog returns an empty list Can you help me, please? Thanks!!!
Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner
I reindex the catalog and it found 17 objects for Owner
But if I make a search for Owner ZCatalog returns an empty list
Can you help me, please?
make sure you are searching on the same field 'name' that you indexed (ie. 'getOwner'), and make sure that the field value you select is valid (ie. the FieldIndex must contain an entry which exactly matches the search term you use). HTH Jonathan
Jonathan Hobbs wrote:
Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner
I reindex the catalog and it found 17 objects for Owner
But if I make a search for Owner ZCatalog returns an empty list
Can you help me, please?
make sure you are searching on the same field 'name' that you indexed (ie. 'getOwner'), and make sure that the field value you select is valid (ie. the FieldIndex must contain an entry which exactly matches the search term you use).
HTH
Jonathan
Hi Jonathan My index is called propietario and the user is Garito My search is catalog({'propietario': 'Garito'}) Is this correct? Thanks!
Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner
I reindex the catalog and it found 17 objects for Owner
But if I make a search for Owner ZCatalog returns an empty list
Can you help me, please?
make sure you are searching on the same field 'name' that you indexed (ie. 'getOwner'), and make sure that the field value you select is valid (ie. the FieldIndex must contain an entry which exactly matches the search term you use).
HTH
Jonathan
Hi Jonathan My index is called propietario and the user is Garito My search is catalog({'propietario': 'Garito'})
Is this correct?
As long as the zcatalog you have created is named 'catalog' this looks ok to me. To see what is in the index create a python script with the following content: theIndex = context.restrictedTraverse('catalog/Indexes/propietario') for item in theIndex.items(): print item return printed To quickly run the script, just click on the 'Test' tab at the top of the ZMI screen where you are editing the python script (after you have saved it!). This will give you a list of the field index values (and some other stuff which you can ignore). HTH Jonathan
Jonathan Hobbs wrote:
Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner
I reindex the catalog and it found 17 objects for Owner
But if I make a search for Owner ZCatalog returns an empty list
Can you help me, please?
make sure you are searching on the same field 'name' that you indexed
(ie.
'getOwner'), and make sure that the field value you select is valid (ie.
the
FieldIndex must contain an entry which exactly matches the search term
you
use).
HTH
Jonathan
Hi Jonathan My index is called propietario and the user is Garito My search is catalog({'propietario': 'Garito'})
Is this correct?
As long as the zcatalog you have created is named 'catalog' this looks ok to me. To see what is in the index create a python script with the following content:
theIndex = context.restrictedTraverse('catalog/Indexes/propietario')
for item in theIndex.items(): print item
return printed
To quickly run the script, just click on the 'Test' tab at the top of the ZMI screen where you are editing the python script (after you have saved it!). This will give you a list of the field index values (and some other stuff which you can ignore).
HTH
Jonathan
Uau! Thanks Jonathan. You code is very simple but it resolve a debug problem!!!! I will use it
--On Donnerstag, 2. Dezember 2004 20:05 Uhr +0100 Garito <garito@sistes.net> wrote:
Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner
I reindex the catalog and it found 17 objects for Owner
But if I make a search for Owner ZCatalog returns an empty list
maybe because the catalog object was not indexed? check the list of indexed objects. -aj
--On Donnerstag, 2. Dezember 2004 20:05 Uhr +0100 Garito <garito@sistes.net> wrote:
Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner
I reindex the catalog and it found 17 objects for Owner
getOwner() returns the user *object* but *not* the username! -aj
Andreas Jung wrote:
--On Donnerstag, 2. Dezember 2004 20:05 Uhr +0100 Garito <garito@sistes.net> wrote:
Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner
I reindex the catalog and it found 17 objects for Owner
getOwner() returns the user *object* but *not* the username!
-aj
Hi Andreas Do you know how to setup the index to returns the username with a fileindex? If is not possible I can use proxyindex Thanks!
--On Donnerstag, 2. Dezember 2004 20:48 Uhr +0100 Garito <garito@sistes.net> wrote:
Andreas Jung wrote:
--On Donnerstag, 2. Dezember 2004 20:05 Uhr +0100 Garito <garito@sistes.net> wrote:
Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner
I reindex the catalog and it found 17 objects for Owner
getOwner() returns the user *object* but *not* the username!
-aj
Hi Andreas Do you know how to setup the index to returns the username with a fileindex? If is not possible I can use proxyindex
Write script that returns the owner as *string* and give the fieldindex the name of that script. -aj
Andreas Jung wrote:
--On Donnerstag, 2. Dezember 2004 20:48 Uhr +0100 Garito <garito@sistes.net> wrote:
Andreas Jung wrote:
--On Donnerstag, 2. Dezember 2004 20:05 Uhr +0100 Garito <garito@sistes.net> wrote:
Hi again I'm try to make searches for owner For that I create a FieldIndex with Indexed attributes getOwner
I reindex the catalog and it found 17 objects for Owner
getOwner() returns the user *object* but *not* the username!
-aj
Hi Andreas Do you know how to setup the index to returns the username with a fileindex? If is not possible I can use proxyindex
Write script that returns the owner as *string* and give the fieldindex the name of that script.
-aj
Hi Andreas! I prefer to create the index as proxyindex insteat of fieldindex (I actually use a proxyindex index) Thanks you for your very apreciate help!
participants (3)
-
Andreas Jung -
Garito -
Jonathan Hobbs