Hi, Sachin, If you like self-join, you may need to retrieve the data from the second query and merge them into each Document object. Then you can do the query in one shot. (it's redundant. but do not try to normalize data in the index.)
Lucene is an index. Just like index in SQL database, which can only support one way to query data efficiently. Lucene index can support one of your query execution path fast. Different query may require different index structure. -- Chris Lu ------------------------- Instant Scalable Full-Text Search On Any Database/Application site: http://www.dbsight.net demo: http://search.dbsight.com Lucene Database Search in 3 minutes: http://wiki.dbsight.com/index.php?title=Create_Lucene_Database_Search_in_3_minutes DBSight customer, a shopping comparison site, (anonymous per request) got 2.6 Million Euro funding! On Jan 8, 2008 4:23 AM, sachin <[EMAIL PROTECTED]> wrote: > > I need to write lucene query something similar to SQL self joins. > > My current implementation is very primitive. I fire first query, get the > results, based on the result of first query I fire second query and then > merge the results from both the queries. The whole processing is very > expensive. Doing this is very easy with SQL query as we need to just > write self join query and database do the rest for you. > > What is the best way of implementing the above functionality in lucene? > > Regards > Sachin > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]