cancel
Showing results for 
Search instead for 
Did you mean: 

fulltext search through REST API returns deleted documents

chrisd_
Champ in-the-making
Champ in-the-making

I'm doing a full-text search using the REST API using /path/to/folder@search?fullText="" but I get the deleted documents as well in the reply. If I perform this same search on the Web UI, only the non-deleted documents are shown. Is there any way to apply the same filter ecm:currentLifeCycleState != 'deleted' with the fullText search using the REST API?

1 ACCEPTED ANSWER

Damien_Metzler
Star Contributor
Star Contributor

Hello, the @search?fullText= is here for historic reasons, and was embeded into webengine a few years ago. The prefered way is to forge your query with @search?query= like you did.

View answer in original post

3 REPLIES 3

chrisd_
Champ in-the-making
Champ in-the-making

I worked around it by using the search?query= API, which allowed me to specifically exclude deleted documents, but it seems to me that writing this full query is not the right way for imho the most common case of fulltext search: search your non-deleted doucments.

Damien_Metzler
Star Contributor
Star Contributor

Hello, the @search?fullText= is here for historic reasons, and was embeded into webengine a few years ago. The prefered way is to forge your query with @search?query= like you did.

chrisd_
Champ in-the-making
Champ in-the-making

Thanks for that response; is there any documentation to be found on what is preferred vs. deprecated in terms of the various web-APIs?