lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chrisbamford <chrisbamf...@chrisbamford.plus.com>
Subject Overriding FilteredQuery->RandomAccessFilterStrategy.useRandomAccess()
Date Fri, 10 Apr 2015 11:10:55 GMT
Hi,

I am considering overriding 
FilteredQuery->RandomAccessFilterStrategy.useRandomAccess() to always 
return true but am unsure of the performance implications.

Does anyone know if there are any serious downsides to this? I am using 
Lucene 4.10.3.

The reason I need it is because I have built a custom filter (wrapped 
in a ConstantScoreQuery) which I execute as part of the regular query 
which depends on always receiving filterAcceptDocs (i.e. the doc ids 
produced by the main filter).  The default implementation of 
RandomAccessFilterStrategy does not always do this because 
useRandomAccess() can return false sometimes (if I understand correctly, 
when the index is deemed sparse).  There may be a better way of 
achieving what I am trying to do, I just haven't found it yet!

Thanks for any comments / suggestions.

- Chris


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


Mime
View raw message