On Tuesday 28 Elul 5771 17:26:33 David Baron wrote: > On Tuesday 28 Elul 5771 17:04:29 Jean-Francois Dockes wrote: > > David Baron writes: > > > <Log files enclosed: > > > <console-log from console > > > <krunner-log from krunner > > > > > > Note that the krunner one has a query *'downloads'* !! > > > > > > I do not do this, obviously. > > > > > > I have asked a correspondant to do this same test with a non -f test > > > which was also not succeding but returning 3 / 150 hits. > > > > Ok, thanks for the logs, they make it clearer what is happening here. > > > > >From krunner: > > :4:../rcldb/rclquery.cpp:174:Query::setQuery: > > :4:../rcldb/rcldb.cpp:1525:Rcl::Db::filenameWildExp: > > :pattern:[*'Downloads'*] > > > > Command line: > > :4:../rcldb/rclquery.cpp:174:Query::setQuery: > > :4:../rcldb/rcldb.cpp:1525:Rcl::Db::filenameWildExp: pattern: [Downloads] > > > > I will be using [] for quoting in the rest of the message (the [] are not > > part of the strings). > > > > First a bit of explanation on the handling of file name searches: recoll > > will prepend and append a [*] to a file name search if it does not > > already contain wildcards and is not capitalized. Trying to do the right > > thing here, but maybe being slightly too clever. > > > > So the krunner search is expanded from ['Downloads'] to [*'Download'*] > > because ['] is not a capital (not punctuation either because of searches > > like o'donnell etc.) > > > > The second search is not expanded because [D] is a capital. > > Alternatively, searching for [download] would yield a [*download*] > > search. > > > > This is all particularly ennoying because it does not show in the end > > search, which only has the XNONENoMatchingTerms thing, because expansion > > actually occurs (or not) before the search is passed to Xapian. > > > > I'll easily admit that the Recoll choices are dubious here (I'm open to > > suggestions), and I was going to write that I'd least document this > > disconcerting behaviour of the file name search, but in fact, it is, > > already: > > > > http://www.recoll.org/usermanual/rcl.search.html#RCL.SEARCH.SIMPLE > > > > The actual problem here seems to be too much quoting in the data sent by > > krunner. The parameter incoming to recoll is really ['Download'] when it > > should just be [Download]. This might also cause the other query issues > > that you mention. > > > > What's strange is that such a krunner issue should also show with other > > commands ? Or was the search actually entered with single quotes in the > > krunner window ? I can't really guess what happens or should be done here > > because I don't know how krunner executes commands (sh -c or exec(2) or > > whatever...) > > The run is being done by a start( QString cmd, QStringList args ) type of > fork. I, as recommended, place the query string argument in single quotes > in the program, not in krunner's text line window. I assume the internal > start() function is an exec but I could be wrong. > > Question, since the query string is a singe QString, last entry in the > QStringList, should the quotes not be there? Within this list of arguments, > there is no ambiguity. Question would be after it is expanded in the run > shell, would the non-quoted string be problematic? > > Easy enough to try out but not knowing recoll's internals, cannot really > touch all the bases.
I tried it and lo and behold, I get filename search results. A big question, however: The GUI implies and my results seem to indicate that the and/or/query-language options do not work with filenames. Is this true? Or would they work WITH the quotes (seems not to)? This is a GUI design issue since if filename is an exclusive option, then it would radio-button with the others or gray them if checkboxed. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

