You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by aurora <au...@gmail.com> on 2004/11/03 19:39:09 UTC

using lucene as a dictionary database?

Besides full text indexing, I need a database that represent a large
dictionary like:

  (key1, key2) -> docid

I am considering between building a home grown solution and using
Berkeley DB. Then I think I was using Lucene anyway, wouldn't it make
sense use it as my database too? Just make key1 and key2 two keyword
fields and an UnIndexed field for docid?

I need to do something like

  get(key1, key2) -> docid
  get(key1) -> list of docid

This need to be fast

  add( list of (key1,key2,docid) )

This would be done perhaps once a day in a batch.

My experience with Lucene is its very efficient in terms of speed and
storage size. Would this be a right usage with Lucene?

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: using lucene as a dictionary database?

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Yes, you could certainly use Lucene for that.  If public APIs don't do
it for you, there is certainly some nice code under the hood that you
can reuse or borrow.

Otis


--- aurora <au...@gmail.com> wrote:

> Besides full text indexing, I need a database that represent a large
> dictionary like:
> 
>   (key1, key2) -> docid
> 
> I am considering between building a home grown solution and using
> Berkeley DB. Then I think I was using Lucene anyway, wouldn't it make
> sense use it as my database too? Just make key1 and key2 two keyword
> fields and an UnIndexed field for docid?
> 
> I need to do something like
> 
>   get(key1, key2) -> docid
>   get(key1) -> list of docid
> 
> This need to be fast
> 
>   add( list of (key1,key2,docid) )
> 
> This would be done perhaps once a day in a batch.
> 
> My experience with Lucene is its very efficient in terms of speed and
> storage size. Would this be a right usage with Lucene?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org