lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven A Rowe" <>
Subject RE: Lucene: Searching through multiple records.
Date Wed, 19 Mar 2008 14:47:11 GMT
Hi Saikat,

There aren't many subscribers to the mailing list; to increase your
exposure and hence likelihood of response, you should instead use the
mailing list.

On 03/19/2008 at 7:11 AM, Maitra, Saikat (US - Hyderabad) wrote:
> [I]s there a way by which I can Index the entire text
> file, yet do searching for each record separately...i.e
> return hits of a query for a record at a time ?? Currently
> the entire file gets indexed and I don't know how can I
> differentiate between the records. Something like sub-index
> for each record is available ??

You could put the full document in one field, and sub-document records as Lucene documents
in another field, e.g. (format is field-name:content):

  Lucene doc #1
     full-doc:<full source document #1>

  Lucene doc #2
     record:<record #1 from full source document #1>

  doc #3
     record:<record #2 from full source document #1>


As you can see, you don't need a "sub-index" - you can mix different types of "documents"
in the index.


View raw message