CMS : Full-Text Query : execute full-text search ?

Med_2024
edited February 23, 2024 in Thrust Services #1

Hello ,

I have a requirement to use the full-text query but I faced some issues :

  1. error "Search" is not enabled for tenant"

2) The documentation for this API is insufficient

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Answers

  • gvicari
    gvicari E Community Moderator

    Hi @Med_2024, full-text is indeed disabled by default. I'll check with the team to update the documentation.

    In the meantime, you can go to the tutorial/sample application in GitHub (https://github.com/opentext/demo-contract-approval-app). The "postman" folder contains both a postman collection and environment that you can run inside of Postman.

    In the Cloud Developer Tutorial collection structure, the /Content Metadata Service (CMS)/full-text folder contains the different requests related to enabling FT indexing. Try this out to see if it solves your problem.

  • Hello @gvicari, Thank for your response , I enabled the Full-Text Query for my tenant , but for the POST api call

    for executing the search query , I did not figure out how to provide the correct values the following parameters in the

    body as I interested in the facets and the example in the postman collection dosen't cover this !

  • gvicari
    gvicari E Community Moderator

    @Med_2024, this is with the content team and they are looking into your request.

  • Karen Weir
    Karen Weir E Community Administrator

    Thanks @gvicari

    We are indeed working with teams to update our documentation. @Med_2024 , thank you for your diligence and collaboration. I understand that you have connected with @LazarescuA to learn more about the search functionality.

  • @Med_2024 I have attached a collection with some examples for using facets. Let me know if this helps.

  • Hello @Prasanna Sridharan , Thank you for your response , so I tested the examples you provided , but in the API

    calls results I can't see the information related to facets , only the collection of Type Instances ,

    any idea about this ?

  • LazarescuA
    LazarescuA E Community Moderator

    Hello @Med_2024 ,

    If you run the tests that Prasana provided, there is an example for faceted search. The way that works, is:

    • you send the pagination through the url parameters similarly to an instances call
    • you send the required facet(s) in the body of the request (NOTE: my tenant is on search v1, so I am using . between the type name and the value. In search v2 you will replace the . with double underscore __ just like in Prasana's examples)
    • you get the response with the same _embedded.collection[] array with the objects
    • also in the response, you will get the facets information (after page and total fields):
    • Then, if you want to use a facet for filtering, reissue the initial call to /cms/ft-search using it: (I am filtering for just the text/plain value)
    • and the new response will recalculate the facets also:

    If you want, you can post here the payload and the response to see if there is anything wrong in there.

  • Hello @LazarescuA and thank you for assisting ,

    This is a simple test , I'm missing something ?

  • @LazarescuA , it worked with facet.field , I don't know if this search v1 or v2 ?

  • LazarescuA
    LazarescuA E Community Moderator

    You can try the following endpoint to check your version of search:

    /cms/tenants/{{tenant_id}}

    Do a get REST request where tenant_id is your tenant id.

    One of the response fields is searchVersion - for me it is 1.

    @Prasanna Sridharan what is the right notation for facet field in the request body, facet.field or facet__field?

  • The searchVersion for me is 2 .

  • Hello @Prasanna Sridharan , Hello @LazarescuA , I have this issue when using the following query alone it returns

    the result , but when used with facet the result is empty ?? Thank you

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In