Re: Creating New Filter

2010-03-10 Thread D Bera
 In a sense, yes. What I want to be able to do is use a query like
 'LIKE image1.jpg' and Beagle will return all images within a certain
 distance of image1.jpg. pHash uses its own database organized as a

Then you want to implement an IQueryable that parses the query, looks
for LIKE:xxx query clauses and creates results using its own
database. Just one caveat: beagle query syntax allows boolean AND, OR,
grouping and several others things - and your IQueryable will not be
able to deal with these queries. That is, your IQueryable will not be
able to meaningfully support abcd LIKE:1234 (meaning: files with
abcd in it and similar to 1234); it can handle LIKE:1234 queries
safely. Of course, the IQueryable can flat refuse to serve any query
not of the form LIKE:xyz.

There would be another issue of getting results from multiple backends
- its not clearly defined what happens in this case. So if you have
the files backend enabled, then you will have results from both the
files backend and your iqueryable and results from your iqueryable
might get replaced by the files backend results. There might have been
some way you could override this ... but I don't remember any details
=(

- dBera
___
Dashboard-hackers mailing list
Dashboard-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/dashboard-hackers


Re: Creating New Filter

2010-03-09 Thread D Bera
 With that said, it seems like we could create our own backend that is
 just an IQueryable that merely traverses a directory and creates our
 own index. Then anytime a file is being searched for with the correct
 query syntax, we can consult our index and return the correct results.
 However, our index is specific to the media file type, e.g. all audio
 files go into one index, images in another but it seems like the
 backend should not care about the file type, so I'm not sure if this
 is the correct approach or not.

I am still not sure what you want. Do you want to augment the search
functionality so that users can *also* get similar files ? Or do you
want to return the list of similar files when a user search matches a
particular media file e.g. if I search joe satriani, it gives me
media which are tagged with joe-s. and similar ones.

Think about the different components in this way:
- IQueryable - only for querying - if you want to do extra things only
during a query
- Backend - the full hammer - if you want to do everything your way
- Filter - only for data to store in the index - if you want to add
extra things in the index (both queryable information or non-queryable
information)

Keep in mind the fact that, you can store additional information in
the index for each file which you can use during querying to do extra
things.

But I am not sure of your exact intention about pHash and beagle.
___
Dashboard-hackers mailing list
Dashboard-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/dashboard-hackers


Re: Creating New Filter

2010-03-04 Thread D Bera
 I am having trouble getting my Beagle filter to work. I have placed it
 in the correct location but when running beagle-extract-content it
 reports that 0 filters were loaded from my extension.

Possibly
(1) the localtion was incorrect
(2) the mimetype or extension are not correctly reported

You can figure what is going wrong by carefully looking at
(1) external-filter.xml file
(2) output of beagle-extract-content
(3) output of beagle-info --list-filters (or whatever is the right
command to list all the filters)

 I also have several additional questions:
 1) Can custom indexing methods be created? I want to use my own
 database/tree to store a perceptual hash of a media file to allow
 similarity searching of media files. In order to efficiently search
 for similar files, we are using a specially built tree.

No. If you want to store your own indexing data, then why would you
need beagle ?

 1) Are filters able to be chained? I am creating an image filter and
 only want to create the perceptual hash from it but would like any
 other image filters installed to also run on the file.

Yes only if you are willing to write C# code. E.g. lot of our image
filters are extended from other simpler image formats by subclassing
from the generic image classes. You can do the same; but there is no
way to do this outside of C#. This is by design.

- dBera

-- 
-
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user
___
Dashboard-hackers mailing list
Dashboard-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/dashboard-hackers


Creating New Filter

2010-03-02 Thread Evan Klinger
Hello all,
I am having trouble getting my Beagle filter to work. I have placed it
in the correct location but when running beagle-extract-content it
reports that 0 filters were loaded from my extension.
What could be the cause of this? The code is very simple and I can
post it if necessary.

I also have several additional questions:
1) Can custom indexing methods be created? I want to use my own
database/tree to store a perceptual hash of a media file to allow
similarity searching of media files. In order to efficiently search
for similar files, we are using a specially built tree.
1) Are filters able to be chained? I am creating an image filter and
only want to create the perceptual hash from it but would like any
other image filters installed to also run on the file.

Thank you
Evan
___
Dashboard-hackers mailing list
Dashboard-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/dashboard-hackers