CMS : Full-Text Query : Search using trait in facet
I have a requirement to search using trait in facet , but the query is returnig emty results for trait
fields and "cms_not_found" for trait field in "facet_fields_label"
Answers
-
Hello @MohamedRC ,
I am not sure if your fields are spelled correctly as I see the second one with double I (Iincoming).
To make sure you have the right name of the field, you can list the trait attributes (/cms/trait-definitions/<your_trait>/attributes) and check the search_name:
That is the name you need to use (my tenant is on search v1, hence the dot notation, yours is on v2 so you will have __ notation).
Then, use it as a facet field:
And you will get the facets:
0 -
Hello @LazarescuA, I'm in search v2 and the search worked for me only with "facet.field" , the instance name is correct (""Iincoming")
And if I use the search name of the trait attribute "trait_corres_case_trait.Incoming Case Trait.case_id__s" , got this error :
0 -
@LazarescuA , having the same thing when using "cms_any.trait_names_ss" as facet.field , what could be the issue ? Thanks
0 -
Hello,
The search v2 engine needs the field names separated with double __.
I guess in your first example, you will need:
trait_corres_case_trait__Incoming Case Trait__case_id_s
trait_corres_case_trait__Iincoming__case_id_s
And in your second, you will need:
cms_any__trait_names_ss
0 -
But, to be more exact, you can run the following call:
/cms/trait-definitions/corres_case_trai/attributes
On the case_id attribute, see the search_name property, it should give you the right notation. Replace <instance> with your instance name.
0 -
Hello @LazarescuA
I figured the issue is on the instance name , as you can see my instance name is "Incoming Case Trait"
But it appears that for some reason in the facet.field instance name shouldn't contain spaces , so in conclusion
what worked for me :
1 -
Glad it worked in the end! V1 accepts spaces, good to know v2 does not.
0 -
Actually, I just checked, in v1 it is exactly the same, sorry, you need to replace any space in the instance name with an _ (underscore)
0 -
Hello @LazarescuA , could please tell how I can have an exhaustive list of system properties like
"cms_any__all_values" to be used in facet queries , I tried GET /cms/search-health , but it seems that it does not
contain the full list . My requirement is to filter by parent folder id.
Thank you.
0 -
Well, that is really easy. You just call the /cms/type-definitions/<type_name>?expandAll=true or /cms/type-definitions/<type_name>/attributes-all. Then, for each attribute, you will see the search name. Here is an example for /cms/type-definitions/cms_any:
Yours will most probably be cms_any__parent_folder_id_s
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 149 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories