lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re[2]: Is complex query like this possible?
Date Wed, 01 Feb 2012 21:15:07 GMT

: DIR:true
: PATH:/root/folder1/folder2/
: NAME:folder3
: SIZE:0
	...
: DIR:false
: PATH:/root/folder1/folder2/folder3/
: NAME:image.jpg
: SIZE:1234567
	...
: your solution). Also, in my previous example a file of specified type 
: may be deeper than one level: if there are /root/folder1, /root/folder2 
: and file /root/folder1/aaa/bbb/ccc/image.jpg, and I query for "folder", 
: only folder1 must be returned.

I don't think you're going to find an *easy* way to do what you want -- 
solr is designed to return *documents* that match queries, and you've 
modeled documents to match individual files -- so it's not easy to get 
solr to return the ancestor directories of those files as results.

grouping could be used for something like "find the parent directories of 
files that match this query" if you grouped on the PATH, but that won't 
help you with your expectation that 
an example like "/root/folder1/aaa/bbb/ccc/image.jpg" should return 
"/root/folder1"

-Hoss

Mime
View raw message