Maximo

 View Only
Expand all | Collapse all

Why is the contains operator used in list view WHERE clause?

  • 1.  Why is the contains operator used in list view WHERE clause?

    Posted Sat November 21, 2020 04:21 PM
    Edited by System Test Wed March 22, 2023 11:53 AM
    I've noticed that Maximo uses Oracle's CONTAINS operator when I do a wildcard search on description fields:

    (contains(description,'$park') > 0 ))

    What is the rationale behind using CONTAINS rather than a more common operator such as LIKE?

    Thank you.
    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Why is the contains operator used in list view WHERE clause?

    Posted Mon November 23, 2020 12:09 AM
    If you look in Database Configuration for workorder.description you will likely see the SEARCHTYPE set to 'TEXT' which leverages a number of rules and non traditional searching. For more info, look here https://www.ibm.com/support/pages/understanding-search-methodologies

    workorder.assetnum has a SEARCHTYPE (out of the box) of 'WILDCARD' which is what I think you are looking for. 

    Since it is a DB Config that you can change, or you can train users to the new approach, or some combination that works for you. 

    You can query maxattributecfg to find them all, but the list is long; between wildcard and text you will probably get into the 10K range. 


    ------------------------------
    christopher winston
    ------------------------------



  • 3.  RE: Why is the contains operator used in list view WHERE clause?

    Posted Mon November 23, 2020 11:22 AM
    CONTAINS is a powerful search tool that uses a context index, which builds a kind of word tree which can be searched using the CONTAINS search syntax. It can make use of TEXT search indexes and performance is greater.

    ------------------------------
    Maarten Brouwers
    ------------------------------