lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: Retrieving all docs in the index
Date Thu, 09 Dec 2004 20:48:36 GMT
On Thursday 09 December 2004 21:18, Ravi wrote:
> That was exactly my original question. I was wondering if there are
> alternatives to this approach.  

In case you need only a few of the top ranking documents,
and the documents are to be sorted by date anyway,
you might consider to search each of the dates in sorted
order separately until you have enough results.

In that way there is no need to use a field with some constant
value. Nonetheless, I can recommend to have a special field
containing all the field names for a document. As all
docs normally contain a primary key, the name of the primary
key field can serve as the constant value.

Regards,
Paul Elschot

 
> -----Original Message-----
> From: Aviran [mailto:amordo@infosciences.com] 
> Sent: Thursday, December 09, 2004 2:08 PM
> To: 'Lucene Users List'
> Subject: RE: Retrieving all docs in the index
> 
> In this case you'll have to add another field with a fixed value to all
> the documents and query on that field
> 
> 
> Aviran
> http://www.aviransplace.com
> 
> -----Original Message-----
> From: Ravi [mailto:ravi@htinc.com]
> Sent: Thursday, December 09, 2004 14:04 PM
> To: Lucene Users List
> Subject: RE: Retrieving all docs in the index
> 
> 
> I'm sorry I don't think I articulated my question well. We use a date
> filter
> to sort the search results. This works fine when te user provides some
> search criteria. But if he gives an empty search criteria, we need to
> return
> all the documents in the index in the given date range sorted by date.
> So I
> was looking for a query that returns me all documents in the index and
> then
> I want to apply the date filter on it.  
> 
> 
> -----Original Message-----
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com] 
> Sent: Thursday, December 09, 2004 1:55 PM
> To: Lucene Users List
> Subject: Re: Retrieving all docs in the index
> 
> On Dec 9, 2004, at 1:35 PM, Ravi wrote:
> >  Is there any other way to extract all documents from an index apart
> > from adding an additional field with the same value to all documents 
> > and then doing a term query on that field with the common value?
> 
> Of course.  Have a look at the IndexReader API.
> 
> 	Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message