Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] [snipmatch] templates store

If have one "composite store" composed with many "simple store" (your class has implemented already). The whole search method of SnipMatch will be like this:

1. Invoke composite store's search method
2. composite store's search method invoke all the simple stores' search method
3. merge all the search results and then get a List<MatchNode>, return

It is some kind of troublesome.

In fact, we should only notice that TemplateStore's snippetsdir means snippets' main directory, there are also some sub directories in it. When you create and update Lucene's index, do not forget this point, it is enough. Isn't it ? 

This method:

private void updateIndex() {
        for (final File f : snippetsdir.listFiles()) {
            // iterate all snippetsdir's subdirectories here to get all the files
        }
    }

You idea ?

2012/2/22 Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxx>
I like your proposal to use a list of folders and and having different ones for different use cases! How about having one  "composite store" that in itself be composed of many different stores (and store implementations)? One such implementation (or instance) would be "private", one "shared", one "community" etc.

The code I've submitted would than just handle one snippet repository but many of them. Anyway, you decide on the implementation and I'll fully support your decision on this.

Best,
Marcel


On 22.02.2012, at 13:39, Chen Cheng wrote:

Hi Marcel,

May be i should read your code first, then i will not post last mail :-)

Yeah, your code is what i think, just a small detail, i think there should at least 3 sub-directories under snippets main directory. They should be:

1. common: store snippets sync with remote server, check out only, can not check it.
2. personal snippets directory, named by userid may be, store personal snippets sync with remote server, *owner* can check out and check it. So if there are several different users, there may be different personal snippets directory.
3. anonymous: store snippets used only in local, edit without id identify certification, will not sync with remote server. 

2012/2/22 Marcel Bruch <marcel.bruch@xxxxxxxxx>
Hi Cheng,

did you already create a (preliminary) API for the template store? I think, all details will be hidden behind some interface (maybe configurable by extension points and preferences in Eclipse later on). This probably also includes storage, searching, caching etc.

To write the indexer I need to see some kind of interface to integrate with. I just had 90 minutes spare time (exam supervision) and scratched a few bits to start the discussion. See this class for what I had in mind at the beginning:  http://goo.gl/vXjZc Please note, that this is a skeleton only and not considered to work ATM. Just looking - no execution :)
_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev



--
Best Regards From Cheng Chen [chengchendoc@xxxxxxxxx]
_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev

Thanks,
Marcel



_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev




--
Best Regards From Cheng Chen [chengchendoc@xxxxxxxxx]

Back to the top