0
votes

i use elasticsearch to get some documents, in these doc i have a field path like

c:/doc1/doc2/name_of_doc

so i would like to get only the documents in the doc2 root i do not want the documents in a subfolder of doc2

I test the prefix options but if i use that the doc in subfolder will appear

so is it possible to get all doc directly in "c:/doc1/doc2/" with a regex,

or is it possible to add the name of the file in my query? (the name is stored in elasticsearch) like

"c:/doc1/doc2/" . name.value
1
What habe you tried?Martin Senne

1 Answers

0
votes

i Find it thanks

filter ['bool'] ['should'] [] = array (
                'regexp' => array (
                        'ecm:path' => "c:\/doc1/doc2\/([^\/]*)"
          )
);