Re: [Tracker] Indexing the content of java files



Nautilus defines the files as: text/x-java, and I also see trackerd indexing the files if I start it from command line.

For instance if I only let trackerd index a directory with a single file. I can see that it picks the file up correctly.

mime is text/x-java for /home/nl24167/java/sources/camel/camel-core/src/main/java/org/apache/camel/CamelTemplate.java
file extension is java
file /home/nl24167/java/sources/camel/camel-core/src/main/java/org/apache/camel/CamelTemplate.java is indexable
file /home/nl24167/java/sources/camel/camel-core/src/main/java/org/apache/camel/CamelTemplate.java has fulltext 1 with service Development
Indexing /home/nl24167/java/sources/camel/camel-core/src/main/java/org/apache/camel/CamelTemplate.java with service Development and mime text/x-java (existing)
0 files are pending with count 0
Flushing all words - total hits in cache is 3, total words 0
could not update word hit text - appending
could not update word hit text/x-java - appending

The class definition in this file is something like this:

public class CamelTemplate<E extends Exchange> extends ServiceSupport implements ProducerTemplate<E> {

So I expect that when I search for 'ServiceSupport' this file should be returned as a hit, but it doesn't. The strange thing however is that tracker-search does find two other files that have 'ServiceSupport' in it's content.

It almost seems like it stopped indexing somewhere, or doesn't update it's index any more.

Jos





On 11/3/07, jamie <jamiemcc blueyonder co uk> wrote:
On Sat, 2007-11-03 at 10:48 +0100, Jos Dirksen wrote:
> Hi,
>
> Using tracker it's now very easy to search for mails and documents.
> Only one thing isn't working for me the way I'd like it: searching
> inside java source files. I see trackerd indexing the files, but when
> I search for content I know is inside the java source files, the files
> aren't found? Perl files seem to be indexed correctly, however, since
> I see those returning from my searchs?
>
> I'm I missing something here, or are java source files just not
> searchable?

they should be assuming the mime type is correct - does nautilus
identify the java files as :

"text/x-java" or "text/x-java-source" or "application/x-java" or
"application/x-_javascript_" (tracker definitely indexes all of these)

If not, make sure you have the shared-mime-info package installed

Also there is a bug in tracker-search-tool in 0.6.3 which omits the last
category in a search

to be sure if it is searchable try tracker-search on the command line






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]