Bug 347433 - Allow Baloo to index several kinds of text files
Summary: Allow Baloo to index several kinds of text files
Status: RESOLVED DUPLICATE of bug 337583
Alias: None
Product: Baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.9.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Vishesh Handa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-08 16:10 UTC by Lorenzo Bettini
Modified: 2015-05-12 14:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Bettini 2015-05-08 16:10:18 UTC
I've just installed Kubuntu and the new Plasma 5.3; baloo is working great, but it does not seem to index text files such as, e.g., *.java.
They are not excluded in the baloofilerc, and before Plasma 5.2 Java files were correctly indexed.

I think there should be an option to specify which kinds of mime types are indexed; something similar was available in nepomuk if I remember correctly.

Reproducible: Always

Steps to Reproduce:
1. create a Java file, Example.java, with some contents
2. save it
3. baloo does not index it
Comment 1 Vishesh Handa 2015-05-11 16:15:20 UTC
It seems by default we do not index code files which includes java/c++/others.

We're planning on bringing back the mimetype configuration options as well as others under an "Advanced" section for Plasma 5.4. Till then you can manually edit the config file - https://community.kde.org/Baloo/Configuration

*** This bug has been marked as a duplicate of bug 337583 ***
Comment 2 Lorenzo Bettini 2015-05-11 16:22:53 UTC
(In reply to Vishesh Handa from comment #1)
> It seems by default we do not index code files which includes
> java/c++/others.
> 
> We're planning on bringing back the mimetype configuration options as well
> as others under an "Advanced" section for Plasma 5.4. Till then you can
> manually edit the config file - https://community.kde.org/Baloo/Configuration

I don't see any part in the documentation to explicitly enable mime types: only to exclude mime types... am I missing something?
Comment 3 Vishesh Handa 2015-05-11 16:26:41 UTC
(In reply to Lorenzo Bettini from comment #2)
> (In reply to Vishesh Handa from comment #1)
> > It seems by default we do not index code files which includes
> > java/c++/others.
> > 
> > We're planning on bringing back the mimetype configuration options as well
> > as others under an "Advanced" section for Plasma 5.4. Till then you can
> > manually edit the config file - https://community.kde.org/Baloo/Configuration
> 
> I don't see any part in the documentation to explicitly enable mime types:
> only to exclude mime types... am I missing something?

If you set it to a blank field, it should include everything (not tested).

PS: If the automatic updating feature of baloo doesn't work you can always recreate your db from scratch via `$ balooclt disable` and `$ balooctl enable`
Comment 4 Lorenzo Bettini 2015-05-11 17:38:23 UTC
(In reply to Vishesh Handa from comment #3)
> (In reply to Lorenzo Bettini from comment #2)
> > (In reply to Vishesh Handa from comment #1)
> > > It seems by default we do not index code files which includes
> > > java/c++/others.
> > > 
> > > We're planning on bringing back the mimetype configuration options as well
> > > as others under an "Advanced" section for Plasma 5.4. Till then you can
> > > manually edit the config file - https://community.kde.org/Baloo/Configuration
> > 
> > I don't see any part in the documentation to explicitly enable mime types:
> > only to exclude mime types... am I missing something?
> 
> If you set it to a blank field, it should include everything (not tested).
> 
> PS: If the automatic updating feature of baloo doesn't work you can always
> recreate your db from scratch via `$ balooclt disable` and `$ balooctl
> enable`

I set it to a blank field (though I had no mime exclusions before, anyway); I haven't regenerated the db from scratch, but I was running baloo from the command line so I can see the output: I created a java file with some contents, but neither the name of the file, nor its contents are shown if I search for them in KRunner... so I guess this workaround does not work...

you may want to try it yourself, in case I missed something.
Comment 5 Vishesh Handa 2015-05-12 10:18:48 UTC
I just tried it out and it worked for me.

$ balooctl stop
$ balooctl disable

[Basic Settings]
Indexing-Enabled=true

[General]
exclude filters=
exclude filters version=2
exclude mimetypes=
first run=false
folders[$e]=/run/media/vishesh/USB DISK/,$HOME/

$ balooctl enable

----
Comment 6 Lorenzo Bettini 2015-05-12 14:19:06 UTC
But that requires to set also exclude filters to an empty string, is that right?
That is not an option for me at the moment :)