Registered Member
|
I need to search through a few hundred of text files for a specific phrase, like e.g. "I want to find this item". The phrase must be in exact the same way in the file. But when I enter this in the search dialog, it seems that Dolphin makes an "or"-search, i.e. it presents all files which contain "I" or "want" or "to" or "find"..., and maybe also combinations of those. Basically, I get a list of hundreds of files, which doesn't help, because most likely the entire phrase is only in one or two of them.
I tried to surround the search phrase by quotes, but that doesn't make any difference. The search dialog doesn't provide any other options than search in contents, or filename... I know there are other tools, but I would like to use Dolphin for that - if it's possible. Does anyone know how to do it? |
Registered Member
|
I can't recreate this issue. As an example I created four text files. 1)I 2)I did 3)I did some 4)I did some search. If I search for I did some, it'll pop up the 3d and 4th file which is correct. https://imgur.com/a/sCcUpDk
If I search for I did some search, it'll only show the fourth file. Regular search, no baloo or anything.https://imgur.com/a/iABD2ba As a sidenote. I only use default search in Dolphin for text string search. Cause it simply doesn't work well for other stuff, never has,ever. To find files I personally use fsearch and a pdfgrep script to find text strings in pdf's. Kfind is another such tool that,imho, doesn't work as it should. Even Catfish does a better job at that. I'd have to check but if I recall correctly, Recoll does string search. Not sure though.
This realm's name is Maya. And she speaks Hertz. But Ahamkara makes a fuzz about it.
|
Registered Member
|
Thank you for trying!
You may be right, but may be not. Consider Dolphin just finding the three words you searched for, it finds them only in 3 and 4. It's correct that it doesn't do an "or" search, I thought it did, but that doesn't seem to be the case. However, it searches for the words you put in, but each individually, and then shows you the files in which it finds them. Try to put them in a different order in the files (like in 4 you put "I search some did"), I bet it will still show you 3 and 4. It shows all files in which those words appear. Otherwise it would not be explainable why it shows so many files of which maybe only one has the phrase in the same order as I put them in. I do not do REGEX searches mostly, just plain text search. Kate does a very good job in looking for phrases, I think, but I don't want those almost 1000 files all open in Kate. That's why I prefer to search first with Dolphin. |
Registered Member
|
So I garbled up the words in the text files. In order of 1,2,3 and 4 it reads did, did I, did I search ,did I search a. If I do the searchterm I did a search, it doesn't show anything. So, it doesn't break the sentence into different parts and spawns separate results. If I search for a piece of sentence in the correct order, it'll show the correct files that contain the two words in that order. https://imgur.com/a/lt7tAzQ It's pretty much what grep does.Bureaublad means Desktop. https://imgur.com/a/qga3wTp
This realm's name is Maya. And she speaks Hertz. But Ahamkara makes a fuzz about it.
|
Registered Member
|
Sorry for not replying earlier.
Now I did a test like you did, and strangely enough, it doesn't show any file at all. The text in 4 different files is 1: "I did a search", 2: "a search I did", 3: "did I a search" and 4: "search I did a". All without quotes. I looked for "I did a search" (also without quotes). It should have shown me at least the first file. It also doesn't show any file when searching for "I did", which should show me 3 files (1,2 and 4 - and if my theory was correct, it shoud show all 4). Makes me wonder what's wrong here. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]