cancel
Showing results for 
Search instead for 
Did you mean: 

how can use searchTerm paramerter to filter documents/folder on document library*

janaka1984
Star Contributor
Star Contributor

Hi,

can i use 'searchTerm' parameter to search documents/folders on document library ?

do i need to change doclist.lib.js to achieve this requirement?

Regards

janaka

5 REPLIES 5

afaust
Legendary Innovator
Legendary Innovator

You should explain what kind of "searchTerm" parameter you are referring to, e.g. if you mean an URL parameter, an internal script variable, a parameter in the Script API etc.

it is URL parameter

this is same as advance search url

afaust
Legendary Innovator
Legendary Innovator

Since there is currently no support for a searchTerm URL parameter in the doclist data web scripts you would have to provide your own override to use such a parameter.

Hi axel,

Document library has used lucene search query to read data. It returned difference result than advanced search which has used fts query.

   allNodes = search.query(

         {

            query: query,

            language: lucene,

            page:

            {

               maxItems: totalItemCount

            },

            sort: filterParams.sort,

            templates: filterParams.templates,

            namespace: (filterParams.namespace ? filterParams.namespace : null)

              

         });

I tried to pass searchTerm  with this search.query(). But it does not support. However I send search keyword with query as +TEXT:”test”. But this can search only content of document.

i can not search document by passing +TEXT:”alfresco.pdf”.

even i override doclist.lib.js, i couldn't managed above parameter of search.query().

please give me hint for this.

Regards

janaka

afaust
Legendary Innovator
Legendary Innovator

If you added a custom query template (merge it with those provided for the filter) similar to "keywords" in the advanced search, you could use +keywords:"alfresco.pdf" and it would behave like it does for the keyword search in advanced search.

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.