cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Search - find folders that have 2 specific documents

evasques
Champ in-the-making
Champ in-the-making
I need to know how I can make a Lucene query in order to retrieve the parent node of the result instead of the node of the result itself.

I have a large repository structure and don't really care at ths point about the documents, just the folder they're contained in and the point of this search is to know the folders which contain, for example, files with type A AND files with type B.

Any ideas?

Thanks in advance
2 REPLIES 2

lista
Star Contributor
Star Contributor
Hi,

how do you plan to execute this Lucene?
If this is an option to you, you can use the existing Lucene query to find the documents, then access its parents using either JavaScript or FTL.

Cheers,
Ivan.

evasques
Champ in-the-making
Champ in-the-making
Hello Ivan,

At this point I can't construct the query I want because it searches in each node, and one node can't be Type A and Type B simultaneously. The only workaround is to perform two separate queries, find the parents of the resultset and then match both of them. But this can be memory consuming and can result in long waiting times. So we don't want to go that way.