Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
d01b1107
Commit
d01b1107
authored
Jan 28, 2015
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable using catalog_full_text for now.
parent
d43af8f6
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
126 additions
and
96 deletions
+126
-96
bt5/erp5_accounting/CatalogRelatedKeyTemplateItem/related_key_list.xml
...unting/CatalogRelatedKeyTemplateItem/related_key_list.xml
+4
-4
bt5/erp5_accounting/bt/template_catalog_related_key_list
bt5/erp5_accounting/bt/template_catalog_related_key_list
+4
-4
bt5/erp5_base/CatalogRelatedKeyTemplateItem/related_key_list.xml
...5_base/CatalogRelatedKeyTemplateItem/related_key_list.xml
+3
-3
bt5/erp5_base/bt/template_catalog_related_key_list
bt5/erp5_base/bt/template_catalog_related_key_list
+3
-3
bt5/erp5_full_text_mroonga_catalog/CatalogRelatedKeyTemplateItem/related_key_list.xml
...atalog/CatalogRelatedKeyTemplateItem/related_key_list.xml
+6
-8
bt5/erp5_full_text_mroonga_catalog/CatalogSearchKeyTemplateItem/search_key_list.xml
..._catalog/CatalogSearchKeyTemplateItem/search_key_list.xml
+0
-2
bt5/erp5_full_text_mroonga_catalog/bt/template_catalog_related_key_list
...text_mroonga_catalog/bt/template_catalog_related_key_list
+6
-8
bt5/erp5_full_text_mroonga_catalog/bt/template_catalog_search_key_list
..._text_mroonga_catalog/bt/template_catalog_search_key_list
+1
-3
bt5/erp5_full_text_myisam_catalog/CatalogFullTextKeyTemplateItem/full_text_key_list.xml
...log/CatalogFullTextKeyTemplateItem/full_text_key_list.xml
+0
-2
bt5/erp5_full_text_myisam_catalog/CatalogRelatedKeyTemplateItem/related_key_list.xml
...atalog/CatalogRelatedKeyTemplateItem/related_key_list.xml
+7
-9
bt5/erp5_full_text_myisam_catalog/bt/template_catalog_full_text_key_list
...ext_myisam_catalog/bt/template_catalog_full_text_key_list
+1
-3
bt5/erp5_full_text_myisam_catalog/bt/template_catalog_related_key_list
..._text_myisam_catalog/bt/template_catalog_related_key_list
+6
-8
bt5/erp5_item/CatalogRelatedKeyTemplateItem/related_key_list.xml
...5_item/CatalogRelatedKeyTemplateItem/related_key_list.xml
+1
-1
bt5/erp5_item/bt/template_catalog_related_key_list
bt5/erp5_item/bt/template_catalog_related_key_list
+1
-1
product/ERP5/tests/testI18NSearch.py
product/ERP5/tests/testI18NSearch.py
+76
-20
product/ERP5Catalog/CatalogTool.py
product/ERP5Catalog/CatalogTool.py
+6
-16
product/ERP5OOo/tests/testDms.py
product/ERP5OOo/tests/testDms.py
+1
-1
No files found.
bt5/erp5_accounting/CatalogRelatedKeyTemplateItem/related_key_list.xml
View file @
d01b1107
<key_list>
<key>
accounting_transaction_line_node_uid | stock/node_uid/z_related_accounting_transaction_stock_line
</key>
<key>
accounting_transaction_line_total_price | stock/total_price/z_related_accounting_transaction_stock_line
</key>
<key>
accounting_transaction_mirror_section_title | catalog
_full_text
/title/z_related_accounting_transaction_mirror_section
</key>
<key>
accounting_transaction_payment_title | catalog
_full_text
/title/z_related_accounting_transaction_payment
</key>
<key>
accounting_transaction_project_title | catalog
_full_text
/title/z_related_accounting_transaction_project
</key>
<key>
accounting_transaction_section_title | catalog
_full_text
/title/z_related_accounting_transaction_section
</key>
<key>
accounting_transaction_mirror_section_title | catalog/title/z_related_accounting_transaction_mirror_section
</key>
<key>
accounting_transaction_payment_title | catalog/title/z_related_accounting_transaction_payment
</key>
<key>
accounting_transaction_project_title | catalog/title/z_related_accounting_transaction_project
</key>
<key>
accounting_transaction_section_title | catalog/title/z_related_accounting_transaction_section
</key>
<key>
preferred_gap_id | category,catalog/id/z_related_preferred_gap
</key>
<key>
preferred_gap_strict_membership_id | category,catalog/id/z_related_strict_membership_preferred_gap
</key>
</key_list>
\ No newline at end of file
bt5/erp5_accounting/bt/template_catalog_related_key_list
View file @
d01b1107
preferred_gap_id | category,catalog/id/z_related_preferred_gap
preferred_gap_strict_membership_id | category,catalog/id/z_related_strict_membership_preferred_gap
accounting_transaction_mirror_section_title | catalog
_full_text
/title/z_related_accounting_transaction_mirror_section
accounting_transaction_section_title | catalog
_full_text
/title/z_related_accounting_transaction_section
accounting_transaction_project_title | catalog
_full_text
/title/z_related_accounting_transaction_project
accounting_transaction_payment_title | catalog
_full_text
/title/z_related_accounting_transaction_payment
accounting_transaction_mirror_section_title | catalog/title/z_related_accounting_transaction_mirror_section
accounting_transaction_section_title | catalog/title/z_related_accounting_transaction_section
accounting_transaction_project_title | catalog/title/z_related_accounting_transaction_project
accounting_transaction_payment_title | catalog/title/z_related_accounting_transaction_payment
accounting_transaction_line_node_uid | stock/node_uid/z_related_accounting_transaction_stock_line
accounting_transaction_line_total_price | stock/total_price/z_related_accounting_transaction_stock_line
\ No newline at end of file
bt5/erp5_base/CatalogRelatedKeyTemplateItem/related_key_list.xml
View file @
d01b1107
...
...
@@ -2,8 +2,8 @@
<key>
child_address_SearchableText | catalog,full_text/SearchableText/z_related_child_address
</key>
<key>
child_telephone_SearchableText | catalog,full_text/SearchableText/z_related_child_telephone
</key>
<key>
default_email_text | catalog,email/url_string/z_related_default_email
</key>
<key>
destination_person_title | category,catalog
,catalog_full_text/title/z_related_destination_person_full_text
</key>
<key>
destination_person_title | category,catalog
/title/z_related_destination_person
</key>
<key>
related_resource_use_uid | category,category,catalog,catalog/uid/z_related_resource_use
</key>
<key>
source_organisation_title | category,catalog
,catalog_full_text/title/z_related_source_organisation_full_text
</key>
<key>
source_person_title | category,catalog
,catalog_full_text/title/z_related_source_person_full_text
</key>
<key>
source_organisation_title | category,catalog
/title/z_related_source_organisation
</key>
<key>
source_person_title | category,catalog
/title/z_related_source_person
</key>
</key_list>
\ No newline at end of file
bt5/erp5_base/bt/template_catalog_related_key_list
View file @
d01b1107
source_organisation_title | category,catalog
,catalog_full_text/title/z_related_source_organisation_full_text
source_person_title | category,catalog
,catalog_full_text/title/z_related_source_person_full_text
destination_person_title | category,catalog
,catalog_full_text/title/z_related_destination_person_full_text
source_organisation_title | category,catalog
/title/z_related_source_organisation
source_person_title | category,catalog
/title/z_related_source_person
destination_person_title | category,catalog
/title/z_related_destination_person
default_email_text | catalog,email/url_string/z_related_default_email
related_resource_use_uid | category,category,catalog,catalog/uid/z_related_resource_use
child_address_SearchableText | catalog,full_text/SearchableText/z_related_child_address
...
...
bt5/erp5_full_text_mroonga_catalog/CatalogRelatedKeyTemplateItem/related_key_list.xml
View file @
d01b1107
<key_list>
<key>
career_skill_title | category,catalog,catalog_full_text/title/z_related_career_skill
</key>
<key>
description | catalog_full_text/description/z_related_uid
</key>
<key>
parent_description | catalog_full_text/description/z_related_parent
</key>
<key>
parent_title | catalog_full_text/title/z_related_parent
</key>
<key>
stock_explanation_title | catalog_full_text/title/z_related_explanation_from_stock
</key>
<key>
stock_mirror_section_title | catalog_full_text/title/z_related_mirror_section_uid_from_stock
</key>
<key>
stock_node_title | catalog_full_text/title/z_related_node_uid_from_stock
</key>
<key>
title | catalog_full_text/title/z_related_uid
</key>
<key>
career_skill_title | category,catalog,catalog/title/z_related_career_skill
</key>
<key>
parent_description | catalog/description/z_related_parent
</key>
<key>
parent_title | catalog/title/z_related_parent
</key>
<key>
stock_explanation_title | catalog/title/z_related_explanation_from_stock
</key>
<key>
stock_mirror_section_title | catalog/title/z_related_mirror_section_uid_from_stock
</key>
<key>
stock_node_title | catalog/title/z_related_node_uid_from_stock
</key>
</key_list>
\ No newline at end of file
bt5/erp5_full_text_mroonga_catalog/CatalogSearchKeyTemplateItem/search_key_list.xml
View file @
d01b1107
...
...
@@ -2,7 +2,5 @@
<key>
SearchableText | MroongaBooleanFullTextKey
</key>
<key>
catalog_full_text.description | MroongaBooleanFullTextKey
</key>
<key>
catalog_full_text.title | MroongaBooleanFullTextKey
</key>
<key>
description | MroongaBooleanFullTextKey
</key>
<key>
full_text.SearchableText | MroongaBooleanFullTextKey
</key>
<key>
title | MroongaBooleanFullTextKey
</key>
</key_list>
\ No newline at end of file
bt5/erp5_full_text_mroonga_catalog/bt/template_catalog_related_key_list
View file @
d01b1107
career_skill_title | category,catalog,catalog_full_text/title/z_related_career_skill
description | catalog_full_text/description/z_related_uid
parent_description | catalog_full_text/description/z_related_parent
parent_title | catalog_full_text/title/z_related_parent
stock_explanation_title | catalog_full_text/title/z_related_explanation_from_stock
stock_mirror_section_title | catalog_full_text/title/z_related_mirror_section_uid_from_stock
stock_node_title | catalog_full_text/title/z_related_node_uid_from_stock
title | catalog_full_text/title/z_related_uid
\ No newline at end of file
career_skill_title | category,catalog,catalog/title/z_related_career_skill
parent_description | catalog/description/z_related_parent
parent_title | catalog/title/z_related_parent
stock_explanation_title | catalog/title/z_related_explanation_from_stock
stock_mirror_section_title | catalog/title/z_related_mirror_section_uid_from_stock
stock_node_title | catalog/title/z_related_node_uid_from_stock
\ No newline at end of file
bt5/erp5_full_text_mroonga_catalog/bt/template_catalog_search_key_list
View file @
d01b1107
SearchableText | MroongaBooleanFullTextKey
catalog_full_text.description | MroongaBooleanFullTextKey
catalog_full_text.title | MroongaBooleanFullTextKey
description | MroongaBooleanFullTextKey
full_text.SearchableText | MroongaBooleanFullTextKey
\ No newline at end of file
title | MroongaBooleanFullTextKey
\ No newline at end of file
bt5/erp5_full_text_myisam_catalog/CatalogFullTextKeyTemplateItem/full_text_key_list.xml
View file @
d01b1107
...
...
@@ -2,7 +2,5 @@
<key>
SearchableText
</key>
<key>
catalog_full_text.description
</key>
<key>
catalog_full_text.title
</key>
|
<key>
description
</key>
|
<key>
full_text.SearchableText
</key>
|
<key>
title
</key>
|
</key_list>
\ No newline at end of file
bt5/erp5_full_text_myisam_catalog/CatalogRelatedKeyTemplateItem/related_key_list.xml
View file @
d01b1107
<key_list>
<key>
career_skill_title | category,catalog,catalog_full_text/title/z_related_career_skill
</key>
<key>
description | catalog_full_text/description/z_related_uid
</key>
<key>
parent_description | catalog_full_text/description/z_related_parent
</key>
<key>
parent_title | catalog_full_text/title/z_related_parent
</key>
<key>
stock_explanation_title | catalog_full_text/title/z_related_explanation_from_stock
</key>
<key>
stock_mirror_section_title | catalog_full_text/title/z_related_mirror_section_uid_from_stock
</key>
<key>
stock_node_title | catalog_full_text/title/z_related_node_uid_from_stock
</key>
<key>
title | catalog_full_text/title/z_related_uid
</key>
<key>
career_skill_title | category,catalog,catalog/title/z_related_career_skill
</key>
<key>
parent_description | catalog/description/z_related_parent
</key>
<key>
parent_title | catalog/title/z_related_parent
</key>
<key>
stock_explanation_title | catalog/title/z_related_explanation_from_stock
</key>
<key>
stock_mirror_section_title | catalog/title/z_related_mirror_section_uid_from_stock
</key>
<key>
stock_node_title | catalog/title/z_related_node_uid_from_stock
</key>
</key_list>
bt5/erp5_full_text_myisam_catalog/bt/template_catalog_full_text_key_list
View file @
d01b1107
SearchableText
catalog_full_text.description
catalog_full_text.title
description
full_text.SearchableText
\ No newline at end of file
title
\ No newline at end of file
bt5/erp5_full_text_myisam_catalog/bt/template_catalog_related_key_list
View file @
d01b1107
career_skill_title | category,catalog,catalog_full_text/title/z_related_career_skill
description | catalog_full_text/description/z_related_uid
parent_description | catalog_full_text/description/z_related_parent
parent_title | catalog_full_text/title/z_related_parent
stock_explanation_title | catalog_full_text/title/z_related_explanation_from_stock
stock_mirror_section_title | catalog_full_text/title/z_related_mirror_section_uid_from_stock
stock_node_title | catalog_full_text/title/z_related_node_uid_from_stock
title | catalog_full_text/title/z_related_uid
\ No newline at end of file
career_skill_title | category,catalog,catalog/title/z_related_career_skill
parent_description | catalog/description/z_related_parent
parent_title | catalog/title/z_related_parent
stock_explanation_title | catalog/title/z_related_explanation_from_stock
stock_mirror_section_title | catalog/title/z_related_mirror_section_uid_from_stock
stock_node_title | catalog/title/z_related_node_uid_from_stock
\ No newline at end of file
bt5/erp5_item/CatalogRelatedKeyTemplateItem/related_key_list.xml
View file @
d01b1107
<key_list>
<key>
item_catalog_portal_type | catalog/portal_type/z_related_item_catalog
</key>
<key>
item_catalog_reference | catalog/reference/z_related_item_catalog
</key>
<key>
item_catalog_title | catalog
_full_text
/title/z_related_item_catalog
</key>
<key>
item_catalog_title | catalog/title/z_related_item_catalog
</key>
<key>
item_catalog_validation_state | catalog/validation_state/z_related_item_catalog
</key>
</key_list>
\ No newline at end of file
bt5/erp5_item/bt/template_catalog_related_key_list
View file @
d01b1107
item_catalog_title | catalog
_full_text
/title/z_related_item_catalog
item_catalog_title | catalog/title/z_related_item_catalog
item_catalog_portal_type | catalog/portal_type/z_related_item_catalog
item_catalog_reference | catalog/reference/z_related_item_catalog
item_catalog_validation_state | catalog/validation_state/z_related_item_catalog
\ No newline at end of file
product/ERP5/tests/testI18NSearch.py
View file @
d01b1107
...
...
@@ -27,6 +27,7 @@
##############################################################################
import
unittest
from
unittest
import
expectedFailure
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
class
TestI18NSearch
(
ERP5TypeTestCase
):
...
...
@@ -37,56 +38,111 @@ class TestI18NSearch(ERP5TypeTestCase):
return
(
'erp5_full_text_mroonga_catalog'
,
'erp5_base'
,)
def
test_full_test_search
(
self
):
person_module
=
self
.
portal
.
person_module
person1
=
person_module
.
newContent
(
def
afterSetUp
(
self
):
self
.
person_module
=
self
.
portal
.
person_module
self
.
person1
=
self
.
person_module
.
newContent
(
portal_type
=
'Person'
,
first_name
=
'Gabriel'
,
last_name
=
'Fauré'
,
description
=
'Quick brown fox jumps over the lazy dog.'
,
)
person2
=
person_module
.
newContent
(
self
.
person2
=
self
.
person_module
.
newContent
(
portal_type
=
'Person'
,
first_name
=
'武者小路'
,
last_name
=
'実篤'
,
description
=
'Slow white fox jumps over the diligent dog.'
,
)
person3
=
person_module
.
newContent
(
self
.
person3
=
self
.
person_module
.
newContent
(
portal_type
=
'Person'
,
first_name
=
'( - + )'
,
last_name
=
''
,
)
self
.
tic
()
def
beforeTearDown
(
self
):
self
.
person_module
.
manage_delObjects
(
ids
=
list
(
tuple
(
self
.
person_module
.
objectIds
())))
self
.
tic
()
def
test_full_text_searchable_text
(
self
):
# check if 'é' == 'e' collation works
result
=
person_module
.
searchFolder
(
SearchableText
=
'Faure'
)
result
=
self
.
person_module
.
searchFolder
(
SearchableText
=
'Faure'
)
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
person1
.
getPath
())
result
=
person_module
.
searchFolder
(
title
=
'Faure'
)
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
person1
.
getPath
())
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person1
.
getPath
())
# check if a partial string of CJK string matches
result
=
person_module
.
searchFolder
(
SearchableText
=
'武者'
)
result
=
self
.
person_module
.
searchFolder
(
SearchableText
=
'武者'
)
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person2
.
getPath
())
# check boolean language mode search
result
=
self
.
person_module
.
searchFolder
(
SearchableText
=
'+quick +fox +dog'
)
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person1
.
getPath
())
# check sort on fulltext column
self
.
assertFalse
(
'ORDER BY
\
n
MATCH'
in
self
.
portal
.
portal_catalog
(
SearchableText
=
'Faure'
,
sort_on
=
((
'SearchableText'
,
'ascending'
),),
src__
=
1
))
# check sort on fulltext search score
self
.
assertTrue
(
'ORDER BY
\
n
MATCH'
in
self
.
portal
.
portal_catalog
(
SearchableText
=
'Faure'
,
sort_on
=
((
'SearchableText__score__'
,
'ascending'
),),
src__
=
1
))
def
test_catalog_full_text_title
(
self
):
# check if 'é' == 'e' collation works
result
=
self
.
person_module
.
searchFolder
(
**
{
'catalog_full_text.title'
:
'Faure'
})
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
person2
.
getPath
())
result
=
person_module
.
searchFolder
(
title
=
'武者'
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person1
.
getPath
())
# check if a partial string of CJK string matches
result
=
self
.
person_module
.
searchFolder
(
**
{
'catalog_full_text.title'
:
'武者'
})
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
person2
.
getPath
())
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person2
.
getPath
())
# check boolean language mode search
result
=
person_module
.
searchFolder
(
SearchableText
=
'+quick +fox +dog'
)
result
=
self
.
person_module
.
searchFolder
(
**
{
'catalog_full_text.description'
:
'+quick +fox +dog'
}
)
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
person1
.
getPath
())
result
=
person_module
.
searchFolder
(
description
=
'+quick +fox +dog'
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person1
.
getPath
())
# check search with a special character
for
query
in
(
'('
,
')'
,
):
result
=
self
.
person_module
.
searchFolder
(
**
{
'catalog_full_text.title'
:
query
})
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person3
.
getPath
())
# check sort on fulltext column
self
.
assertFalse
(
'ORDER BY
\
n
MATCH'
in
self
.
portal
.
portal_catalog
(
**
{
'catalog_full_text.title'
:
'Faure'
,
'sort_on'
:((
'catalog_full_text.title'
,
'ascending'
),),
'src__'
:
1
}))
# check sort on fulltext search score
self
.
assertFalse
(
'ORDER BY
\
n
MATCH'
in
self
.
portal
.
portal_catalog
(
**
{
'catalog_full_text.title'
:
'Faure'
,
'sort_on'
:((
'catalog_full_text.title__score__'
,
'ascending'
),),
'src__'
:
1
}))
@
expectedFailure
def
test_full_text_title
(
self
):
# check if 'é' == 'e' collation works
result
=
self
.
person_module
.
searchFolder
(
title
=
'Faure'
)
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person1
.
getPath
())
# check if a partial string of CJK string matches
result
=
self
.
person_module
.
searchFolder
(
title
=
'武者'
)
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person2
.
getPath
())
# check boolean language mode search
result
=
self
.
person_module
.
searchFolder
(
description
=
'+quick +fox +dog'
)
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
person1
.
getPath
())
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person1
.
getPath
())
# check search with a special character
for
query
in
(
'('
,
')'
,
):
result
=
person_module
.
searchFolder
(
title
=
query
)
result
=
self
.
person_module
.
searchFolder
(
title
=
query
)
self
.
assertEqual
(
len
(
result
),
1
)
self
.
assertEqual
(
result
[
0
].
getPath
(),
person3
.
getPath
())
self
.
assertEqual
(
result
[
0
].
getPath
(),
self
.
person3
.
getPath
())
# check fulltext search for automatically generated related keys.
self
.
assertTrue
(
'MATCH'
in
self
.
portal
.
portal_catalog
(
destination_title
=
'Faure'
,
src__
=
1
))
...
...
product/ERP5Catalog/CatalogTool.py
View file @
d01b1107
...
...
@@ -881,10 +881,9 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
by looking at the category tree.
For exemple it will generate:
destination_reference | category,catalog/reference/z_related_destination
default_destination_reference | category,catalog/reference/z_related_destination
strict_destination_reference | category,catalog/reference/z_related_strict_destination
destination_title | category,catalog_full_text/title/z_related_destination
destination_title | category,catalog/title/z_related_destination
default_destination_title | category,catalog/title/z_related_destination
strict_destination_title | category,catalog/title/z_related_strict_destination
strict_ related keys only returns documents which are strictly member of
the category.
...
...
@@ -918,18 +917,9 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
if
related
:
end_key
=
end_key
[
len
(
related_string
):]
# XXX: joining with non-catalog tables is not trivial and requires
# ZSQLCatalog's ColumnMapper cooperation, so only allow columns in
# catalog or catalog_full_text tables.
if
end_key
!=
'uid'
and
'catalog_full_text'
in
column_map
.
get
(
end_key
,
()):
related_key_list
.
append
(
prefix
+
key
+
' | category,catalog_full_text/'
+
end_key
+
'/z_related_'
+
(
'strict_'
if
strict
else
''
)
+
expected_base_cat_id
+
(
'_related'
if
related
else
''
)
)
elif
'catalog'
in
column_map
.
get
(
end_key
,
()):
# ZSQLCatalog's ColumnMapper cooperation, so only allow catalog
# columns.
if
'catalog'
in
column_map
.
get
(
end_key
,
()):
is_uid
=
end_key
==
'uid'
if
is_uid
:
end_key
=
'uid'
if
related
else
'category_uid'
...
...
product/ERP5OOo/tests/testDms.py
View file @
d01b1107
...
...
@@ -1243,7 +1243,7 @@ class TestDocument(TestDocumentMixin):
# should return all documents matching a word no matter of contributor
self
.
assertSameSet
([
web_page_1
,
document_4
],
getAdvancedSearchStringResultList
(
**
kw
))
kw
=
{
'searchabletext_any'
:
'owner'
,
'contributor_title'
:
'
Contributor
'
}
'contributor_title'
:
'
%Contributor%
'
}
self
.
assertSameSet
([
document_4
],
getAdvancedSearchStringResultList
(
**
kw
))
# multiple portal_type specified
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment