You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by chrisbamford <ch...@chrisbamford.plus.com> on 2015/04/10 13:10:55 UTC
Overriding
FilteredQuery->RandomAccessFilterStrategy.useRandomAccess()
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