Author Login
Post Reply
Hello,
Erik has right, Lucene is not a RDBMS. If you want mix both world, you can use tools dedicated like Hibernate Search or Compass.
Ulrich VACHON
-------- Message d'origine--------
De: Clay Zhong [mailto:zjclay@(protected)]
Date: mar. 04/11/2008 13:31
À: java-user@(protected)
Objet : Can lucene search from multi-index directory like using FK in database?
Hi Guys,
I meet some problems when using Lucene 2.3.2. After a lot of research, I
still can't find any ways to solve them. Hope you can give me some
advice..
1. Can I search different document from multi-index when they have
connections like FK in database?
For example,
Index Dir 1 (User): Field id, Field departmentId
Index Dir 2 (Department): Field id, Field location
How can I get all user that location is USA?
Well, I can index location into User, or search from Department first to
get departmentId. But they're really terrible, is there a better way?
2. How can I search from multi-index with one query? It's different from
using MultiSearcher.
For example, there's two fields, 'title' and 'content', when I search
'Java and Lucene', how can I get documents which contains 'Java' in
'title' and 'lucene' in 'content'? (not only 'Java and Lucene' in one
field). I can add a field contains both 'title' and 'content', but
that's really really bad solution....
That's all my questions, thanks for your patient.
Best Wishes
Clay Zhong
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@(protected)
For additional commands, e-mail: java-user-help@(protected)
______________________________________________________________________
Cet e-mail a été scanné par MessageLabs Email Security System.
Pour plus d'informations, visitez http://www.messagelabs.com/email
______________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@(protected)
For additional commands, e-mail: java-user-help@(protected)