Re: COUNT SUBINDEX [IN MERGERINDEX]

2004-11-17 Thread Paul Elschot
On Wednesday 17 November 2004 07:10, Karthik N S wrote:
 Hi guy's
 
 
 Apologies.
 
 
   So  A Mergeed Index is again a Single [ addition of subIndexes... ),
 
  If that case , If One of the Field Types is of  type   'Field.Keyword'
 whic is Unique across the subIndexes [Before Merging].
 
  and If I want to Count this Unique Field in a MergerIndex  [After i'ts been
 Merged ] How do I do this Please.

IndexReader.numDocs() will give the number of docs in an index.

Lucene has no direct support for unique fields. After merging, if the
same unique field value occurs in both source indexes, the merged
index will contain two documents with that value.
In case one wants to merge into unique field values, the non unique
values in one of the source indexes need to be deleted before merging.

See IndexReader.termDocs(term) on how to get the document numbers
for (unique) terms via a TermDocs, and IndexReader.delete(docNum)
for deleting docs.

Regards,
Paul.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: COUNT SUBINDEX [IN MERGERINDEX]

2004-11-17 Thread Karthik N S
Hi Guys


Apologies..

I am Still Confused.. ;(


Let me make it more simple Question


   On using Search from a  Index without any SearchWord,  I would like to
count  the total number of Documents present in it.

   [ I Only have the Field Types 'Field.Keyword' which stores the Unique
filename ]

   Will IndexReader.termDocs(term) give me the Count for the same.
   If so How To use it... Please

  Thx in advance.
Karthik



-Original Message-
From: Paul Elschot [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 17, 2004 2:02 PM
To: [EMAIL PROTECTED]
Subject: Re: COUNT SUBINDEX [IN MERGERINDEX]


On Wednesday 17 November 2004 07:10, Karthik N S wrote:
 Hi guy's


 Apologies.


   So  A Mergeed Index is again a Single [ addition of subIndexes... ),

  If that case , If One of the Field Types is of  type   'Field.Keyword'
 whic is Unique across the subIndexes [Before Merging].

  and If I want to Count this Unique Field in a MergerIndex  [After i'ts
been
 Merged ] How do I do this Please.

IndexReader.numDocs() will give the number of docs in an index.

Lucene has no direct support for unique fields. After merging, if the
same unique field value occurs in both source indexes, the merged
index will contain two documents with that value.
In case one wants to merge into unique field values, the non unique
values in one of the source indexes need to be deleted before merging.

See IndexReader.termDocs(term) on how to get the document numbers
for (unique) terms via a TermDocs, and IndexReader.delete(docNum)
for deleting docs.

Regards,
Paul.


-
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]



Re: COUNT SUBINDEX [IN MERGERINDEX]

2004-11-16 Thread Otis Gospodnetic
Once the index is merged there is only 1 index - there are no
subindices.

Otis

--- Karthik N S [EMAIL PROTECTED] wrote:

 
 
 Hi Guys,
 
 
 Apologies .
 
 
 
 Can Some body Tell me which API to use to Count the  number of
 SubIndexe's
 in a MERGED Index.
 
 
 
 Thx in Advance
 
 
 
 
 
   WITH WARM REGARDS
   HAVE A NICE DAY
   [ N.S.KARTHIK]
 
 
 
 
 -
 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]



RE: COUNT SUBINDEX [IN MERGERINDEX]

2004-11-16 Thread Karthik N S
Hi guy's


Apologies.


  So  A Mergeed Index is again a Single [ addition of subIndexes... ),

 If that case , If One of the Field Types is of  type   'Field.Keyword'
whic is Unique across the subIndexes [Before Merging].

 and If I want to Count this Unique Field in a MergerIndex  [After i'ts been
Merged ] How do I do this Please.

  Ex
  SubIndex1 = filename1,filenam2,filenam3

  SubIndex2 = filename4,filenam5,filenam6

 MergerIndex1 = filename1,filenam2,filenam3, filename4,filenam5,filenam6

[From MergerIndex] Count = 6 nos


Something like the above



Thx in Advance




-Original Message-
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 17, 2004 10:30 AM
To: Lucene Users List
Subject: Re: COUNT SUBINDEX [IN MERGERINDEX]


Once the index is merged there is only 1 index - there are no
subindices.

Otis

--- Karthik N S [EMAIL PROTECTED] wrote:



 Hi Guys,


 Apologies .



 Can Some body Tell me which API to use to Count the  number of
 SubIndexe's
 in a MERGED Index.



 Thx in Advance





   WITH WARM REGARDS
   HAVE A NICE DAY
   [ N.S.KARTHIK]




 -
 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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]