Forum Discussion

brendanmkelly's avatar
3 years ago

Inconsistent Documentation Search API LiQL Combination v One Or More

Hi, I may be missing something here, but the documentation seems to say two different things about how combination and one_or_more search constraints work in LiQL. In the Search API Overview the table that maps v1 API parameters to their LiQL equivalents says that:

Combine terms using a string of keywords. Note that this syntax returns results when two or more o the terms appear.

WHERE subject MATCHES 'apples bananas cherries'

However, the documentation at Combinatorial searches with LiQL  at Query for a combination of terms says that: 

SELECT id, subject FROM messages WHERE subject MATCHES('apples','bananas' 'cherries')

A query using this format will not return matches containing only one of the search terms when three or more terms are included in the search string.

And below in Query for one or more terms that states :

SELECT id, subject FROM messages WHERE subject MATCHES 'apples bananas cherries'

The query in the example above returns the ID and subject of messages that include the following combinations of text in the subject field:

  • apples
  • bananas
  • cherries
  • apples bananas
  • apples cherries
  • bananas cherries
  • apples bananas cherries

Unless am I misunderstanding or missing something, the first query I posted and the third query I posted should have the same result, but according to the documentation have two different results. 

Could someone help clarify which is the actual result?

 

  • IanKl's avatar
    IanKl
    Khoros Alumni (Retired)

    Thanks for bringing this to our attention. I'm passing this along to the Docs team. One of us will notify you here when the documentation is clarified so you can have the correct answer.

    SuzieH Handing off to you

  • IanKl's avatar
    IanKl
    Khoros Alumni (Retired)

    Thanks again for bringing this to our attention brendanmkelly . Please mark JavidH 's response as the answer so that other users will know this is resolved. 

  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)

    Hi brendanmkelly. We've created a ticket for our Doc team to review and update as needed. I'm hoping that NoorS can help with some immediate information for you from the Engineering team that maintains the Search feature