lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Lu" <chris...@gmail.com>
Subject Re: Lucene and database
Date Tue, 04 Jul 2006 22:23:09 GMT
For your date interval search requirement, Lucene can do range search.
You need to use ConstantScoreRangeQuery for better performance.

You'd better select all your additional attributes into the lucene
document. This will lead to some data duplications, especially look up
values. But it's a tradeoff for faster response and not really a
problem.

Chris Lu
-----------------------------------
Lucene Search on Any Databases/Applications
http://www.dbsight.net

On 7/4/06, Alexander Mashtakov <amashtakov@gmail.com> wrote:
> Thank you *Giulio,*
>
> I read some information about this approach. Is it possible to store in
> Lucene field
> several FKs ? For example, a document has serveral mappings to category
> table (N:M).
> The other question is about dates - is it possible to query Lucene for date
> interval (from YYYY-MM-DD to YYYY-MM-DD) ?
> And the last (but no least ;) - in database, there are mappings (N:M) which
> contains additional attributes, that have to be searchable - for
> example one document may reference other documents (M:N) with attribute
> typeOf (isPartOf, IsVersionOf). Is it possible
> to include typeOf together with N:M map ?
>
> Sorry, may be questions are stupid but I've just started to investigate
> Lucene ;)
>
> Thank you,
> /Alexander
>
>
> On 7/4/06, Giulio Cesare Solaroli <giulio.cesare@gmail.com> wrote:
> >
> > Hi Alexander,
> >
> > if the set of foreign keys you are using to filter the lucene results
> > with some SQL query, I suggest you to include the foreign keys values
> > as additional lucene fields, and let lucene return you the exact set
> > of document IDs.
> >
> > I had excellent results with this technique.
> >
> > Hope this helps.
> >
> > Best regards,
> >
> > Giulio Cesare Solaroli
> >
> >
> >
> > On 7/4/06, Alexander Mashtakov <amashtakov@gmail.com> wrote:
> > > Hi folks,
> > >
> > > I'm looking for a solution/best practices concerning Lucene and SQL
> > database
> > > integration.
> > > The database (MySQL) is already developed and contains data. I've tried
> > > MySQL full-text
> > > search, but it's quite slow and doesn't have the possibility to
> > intergate
> > > custom analyzers.
> > > Phrase search is perfomed only in boolean mode and doesn't return
> > relevance
> > > factor :(
> > >
> > > The idea is to manage full-text indexes (titles, keywords, summaries)
> > and
> > > perform search
> > > using Lucene. The resultset will include ID's that will be appended to
> > SQL
> > > query in order
> > > to apply additional filters based on foreign keys (categories mappings,
> > > etc).
> > >
> > > But, the database is going to be big enough, and the list of IDs
> > returned by
> > > Lucene too. This
> > > may cause high memory usage and slow sql query speed (for instance 1000
> > IDs
> > > in "IN (id1, id2 ...)"
> > > sql filter)
> > >
> > >
> > > Any ideas, suggestions ?
> > >
> > > --
> > > Thank you,
> > > /Alexander
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>
>
> --
> Regards,
> /Alexander
>
>

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


Mime
View raw message