Hi,

The filter is called oal.search.FieldValueFilter, to make a Query out of it use 
ConstantScoreQuery(new FieldValueFilter(...)).

I think it will come in 3.6, unfortunately 3.5 does not contain it (it was 
added shortly after release by Simon and me, 
https://issues.apache.org/jira/browse/LUCENE-3593). You can use nightly 3.6 
snapshot:
https://builds.apache.org/job/Lucene-3.x/javadoc/all/org/apache/lucene/search/FieldValueFilter.html

Download:
https://builds.apache.org/job/Lucene-3.x/lastSuccessfulBuild/artifact/artifacts/

If you want to use the Bits from FieldCache.getDocsWithField() directly, you 
have to countercheck IndexReader.isDeleted(), eg.: (Bits.get(doc) && 
!reader.isDeleted(doc);

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -----Original Message-----
> From: Paul Taylor [mailto:paul_t...@fastmail.fm]
> Sent: Tuesday, December 20, 2011 8:35 PM
> To: java-user@lucene.apache.org
> Subject: Re: Query that returns all docs that contain a field
> 
> On 20/12/2011 19:27, Uwe Schindler wrote:
> > Hi,
> >
> > No. But the corresponding filter/query does. The bits are just for lookup, 
> > if
> you already have a valid document. The remaining bits are undefined (like the
> rest of Fieldcache).
> >
> > Uwe
> >
> Um, I just looked for the query in Javadocs and couldn't find it, what is it 
> called
> ?
> 
> Paul
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to