lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wal...@Cyveillance.com
Subject RE: Finding All?
Date Fri, 13 Aug 2004 20:01:14 GMT
A ranged query that covers the full range does the same thing.  

Of course it is also inefficient with term generation:  myField[a TO z]

-----Original Message-----
From: Patrick Burleson [mailto:pburleson@gmail.com]
Sent: Friday, August 13, 2004 3:58 PM
To: Lucene Users List
Subject: Re: Finding All?


That is a very interesting idea. I might give that a shot. 

Thanks,
Patrick

On Fri, 13 Aug 2004 15:36:11 -0400, Tate Avery <tate.avery@nstein.com>
wrote:
> 
> I had to do this once and I put a field called "all" with a value of
"true" for every document.
> 
> _doc.addField(Field.Keyword("all", "true"));
> 
> Then, if there was an empty query, I would substitute it for the query
"all:true".  And, of course, every doc would match this.
> 
> There might be a MUCH more elegant solution, but this certainly worked for
me and was quite easy to incorporate.  And, it appears to order the
documents by the order in which they were indexed.
> 
> T
> 
> p.s. You can probably do something using IndexReader directly... but the
nice thing about this approach is that you are still just using a simple
query.
> 
> 
> 
> -----Original Message-----
> From: Patrick Burleson [mailto:pburleson@gmail.com]
> Sent: Friday, August 13, 2004 3:25 PM
> To: Lucene Users List
> Subject: Finding All?
> 
> Is there a way for lucene to find all documents? Say if I have a
> search input and someone puts  nothing in I want to go ahead and
> return everything. Passing "*" to QueryParser was not pretty.
> 
> Thanks,
> Patrick
> 
> ---------------------------------------------------------------------
> 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