lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Siu" <michaely...@hotmail.com>
Subject How to make a query that associates 2 index files
Date Tue, 06 May 2008 16:14:31 GMT
Hi,

 

I am a newbie to Lucene. I have a question for making a query that associate
2 index files:

 

- One index has the content index for a list of documents and a key to the
document. That means the Lucene document of this index contains 2 fields:

the 'content' and the 'key'.

- another index has the some data indexed associated with the 'key' in the
previous index. The Lucene document of this index contains several fields:

the 'who' that contains some data and the 'key' that _points_ to the
document in the first index.

 

Sample data:

Index_1:   [key] [content] 

            Abc   "blah blah 123 ..."

            Xyz   "123 321 a nice day ..."

 

Index_2:   [who]    [accessed]   [key]

            David    1/1/2007     Abc

            Someone  1/2/2005     Abc

            Guess    12/1/2000    Xyz

            Harry    1/1/2008     Abc

            Sandra   1/1/2003     Xyz

 

As shown, the [key] field in Index_2 has repeated value that _points_ to the
[key] values in Index_1. How do I make a query for the following: 

 

Find out all documents in Index_2:

- [who] is in range of 'David' to 'Guess' and

- [accessed] in range '1/1/1900' to '1/1/2010' and

- [key] associated [content] in Index_1 that contains the term 'blah' 

 

I know this is more SQL like query. Is Lucene capable of doing this type of
query that needs associations among index files?

 

Thanks in advance.

 

- m

 

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message