cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to avoid search files under the hidden folder?

gaosh
Champ on-the-rise
Champ on-the-rise

I have a  hidden folder (HiddenInNavigation) under the workspace which hosts many normal files which i don't want to be searched.   But the default searcher always searches these files.

I don't want to make all these files having  the "HiddenInNavigation"  facet. 

So, is there any way to avoid search normal files under the hidden folder? 

1 ACCEPTED ANSWER

Josh-F-Hyland
Employee
Employee

EDIT: I apologize, I misunderstood your question. So of course you could also add the "HiddenInNavigation" facet to those child documents. Another option, if the folder is fairly static (i.e. you're not dynamically creating lots of them) is to filter via ecm:path to exclude that folder, or the filter via ecm:parentId or ecm:ancestorId.

As for the "default searcher" my suggestion would be to replace it. Disable the OOTB Drawer item in Studio Designer and create your own Page Provider and Search that does what you need (as opposed to trying to override the OOTB search, which uses a generic Page Provider that's used in lots of other places so you probably don't want to mess with it).

Old answer below:

Use the "ecm:mixinType" property to filter for any facets you want or don't want. E.g.

SELECT * FROM DOCUMENT WHERE ecm:mixinType != 'HiddenInNavigation'

https://doc.nuxeo.com/nxdoc/nxql/#special-nxql-properties

--
Hyland Sales Solution Engineer

View answer in original post

4 REPLIES 4

Josh-F-Hyland
Employee
Employee

EDIT: I apologize, I misunderstood your question. So of course you could also add the "HiddenInNavigation" facet to those child documents. Another option, if the folder is fairly static (i.e. you're not dynamically creating lots of them) is to filter via ecm:path to exclude that folder, or the filter via ecm:parentId or ecm:ancestorId.

As for the "default searcher" my suggestion would be to replace it. Disable the OOTB Drawer item in Studio Designer and create your own Page Provider and Search that does what you need (as opposed to trying to override the OOTB search, which uses a generic Page Provider that's used in lots of other places so you probably don't want to mess with it).

Old answer below:

Use the "ecm:mixinType" property to filter for any facets you want or don't want. E.g.

SELECT * FROM DOCUMENT WHERE ecm:mixinType != 'HiddenInNavigation'

https://doc.nuxeo.com/nxdoc/nxql/#special-nxql-properties

--
Hyland Sales Solution Engineer

I'm afraid this won't work.  it does not search  the "HiddenInNavigation" files , but the normal files(meaning not the "HiddenInNavigation" file)  under "HiddenInNavigation"  folder  still be searched!  

Many thanks for your quick feedback!  ❤️, the suggestion is very sensible.  i think  the   ecm:ancestorId  would be the suitable filtering condition for my case. 

where do i make these operation?  under nuxeo platform webUI? or anywhere  else ? 

where is the entrance,  under  mac?