Run your Lucene Applications on Google AppEngine with GAELucene

36 views
Skip to first unread message

lhelper

unread,
Sep 14, 2009, 12:23:56 PM9/14/09
to Google App Engine
Enlightened by the discussion "Can I run Lucene in google app engine?
[http://www.nabble.com/Can-I-run-Lucene-in-google-app-engine--
td23017742.html]", I implemented a google datastore based Lucene
component, GAELucene, which can help you to run search applications on
google app engine.

The main clazz of GAELucene include:
* GAEDirectory - a read only Directory based on google datastore.
* GAEFile - stands for an index file, the file's byte content will
be splited into multi GAEFileContent.
* GAEFileContent - stands for a segment of index file.
* GAECategory - the identifier of different indices.
* GAEIndexInput - a memory-resident IndexInput? implementation
like the RAMInputStream.
* GAEIndexReader - wrapper for IndexReader? that cached in
GAEIndexReaderPool
* GAEIndexReaderPool - pool for GAEIndexReader

The following code snippet demonstrates the use of GAELucene do
searching:
Query queryObject = parserQuery(request);
GAEIndexReaderPool readerPool =GAEIndexReaderPool.getInstance();
GAEIndexReader indexReader = readerPool.borrowReader
(INDEX_CATEGORY_DEMO);
IndexSearcher searcher =newIndexSearcher(indexReader);
Hits hits = searcher.search(queryObject);
readerPool.returnReader(indexReader);

You can find more here 'http://code.google.com/p/gaelucene'

Nick Johnson (Google)

unread,
Sep 15, 2009, 11:09:44 AM9/15/09
to google-a...@googlegroups.com
Hi lhelper,

Interesting project! Have you tested it with a large corpus of text to search?

-Nick Johnson
--
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047

Nick Cen

unread,
Sep 15, 2009, 11:50:07 AM9/15/09
to google-a...@googlegroups.com
Hi ihelper,

This is really what i am looking for. Great project, great contribution.

2009/9/15 Nick Johnson (Google) <nick.j...@google.com>



--
http://daily.appspot.com/food/

lhelper

unread,
Sep 16, 2009, 1:04:40 AM9/16/09
to Google App Engine
Hi Johnson,

Here, http://so.3gmatrix.cn/news/search?q=3G, is an app built with
GAELucene.

The index size of 'news' is about 96Mb, docs number is 22651.

The index was splitted into about 200 segments(GAEFileContent) when
GAEFile.SEGMENT_LENGTH was set to 512000(bytes). You can check the
indices use http://so.3gmatrix.cn/gaelucenedashboard/list

On Sep 15, 11:09 pm, "Nick Johnson (Google)" <nick.john...@google.com>
wrote:

Nick Johnson (Google)

unread,
Sep 16, 2009, 10:12:02 AM9/16/09
to google-a...@googlegroups.com
Hi lhelper,

I'm glad to see it evidently scales past the 'trivial' size of test datasets. I'd be keen to see it demonstrated on much larger (multi gigabyte) corpuses, as well as benchmarks of how it performs with increasing corpus size.

All in all, good work on an area that can use contributions like this!

-Nick Johnson
Reply all
Reply to author
Forward
0 new messages