Demo project and a question about indices

30 views
Skip to first unread message

Ray Miller

unread,
Sep 8, 2014, 5:10:03 AM9/8/14
to clojure-...@googlegroups.com
I wanted to put together a little project demonstrating how to use
Titanium with the MovieLens dataset to build a recommendation system.
I've got code to set up the graph and load the MovieLens dataset, and
it won't take too much time to fill in the blanks:
<https://github.com/ray1729/movielens>

One thing that puzzled me is that, although there is a Lucene backend
configured and there are indices defined on movie title and user age
that should use this backend, the lucene directory is created but
remains empty after loading the data. Querying Titan through the
management API shows these indices exist, but I'm not convinced they
are being populated.

Have I missed something? Can you mix-and-match BerkeleyDB and Lucene
like this, or is that not a supported combination? It's quite possible
I've misunderstood how these indices work; I'm hoping that someone
with more experience of Titan can shed some light.

Ray.

Stephen Mallette

unread,
Sep 9, 2014, 6:17:21 AM9/9/14
to clojure-...@googlegroups.com
Hi, Ray, 

In theory it should be possible to mix any storage backend with any search backend.  I did this test:

gremlin> g = TitanFactory.open('conf/titan-berkeleydb-lucene.properties')
==>titangraph[berkeleyje:/tmp/db/berkeley]
gremlin> GraphOfTheGodsFactory.load(g)
==>null

using this titan-berkeleydb-lucene.properties:

storage.backend=berkeleyje
storage.directory=/tmp/db/berkeley
index.search.backend=lucene
index.search.directory=/tmp/db/lucene

when I load GraphOfTheGods my lucene directory fills with files - i have two directories, one named vertices and the other edges.  So having an "empty" directory tells me that something is amiss in your code or in Titanium.  I did look through the code base, but didn't immediately see the problem.  I'll see if I can make some time a little later to dig in with greater detail. Please let me know if you happen to solve it.



Ray.

--
You received this message because you are subscribed to the Google Groups "Clojure Titanium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-titani...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ray Miller

unread,
Sep 27, 2014, 5:33:35 AM9/27/14
to Stephen Mallette, clojure-...@googlegroups.com
It turns out the problem was my choice of index name.

I was calling:

  (build-mixed-index mgmt :user-age-ix :vertex [:age] "search")

Although this appears to work (and the index shows up when queried through the management API), it never gets populated. Changing the call to:

  (build-mixed-index :userAgeIx :vertex [:age] "search")

I see the Lucene data files appearing when I populate the graph. It seems that both '-' and '_' in the index name break things, while alphabetic and digits seem ok.

Ray.

Reply all
Reply to author
Forward
0 new messages