You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2014/07/02 04:47:24 UTC

[jira] [Commented] (LUCENE-5713) FieldCache related test failure

    [ https://issues.apache.org/jira/browse/LUCENE-5713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14049562#comment-14049562 ] 

David Smiley commented on LUCENE-5713:
--------------------------------------

[~rcmuir], lets discuss the issue here instead of dev list emails.

FYI the test class has been renamed to "RandomSpatialOpFuzzyPrefixTreeTest" and the seed still triggers the error.

The one line in the test that sets up the UninvertingReader is in setUp() follows:
{code:java}
//Only for Disjoint.  Ugh; need to find a better way.  LUCENE-5692
uninvertMap.put(getClass().getSimpleName(), UninvertingReader.Type.SORTED);
{code}

This test class tests RecursivePrefixTreeStrategy (RPT), one of something like 5 SpatialStrategy implementations in the spatial API.  RPT *only* makes reference to DocValues (formerly FieldCache) for supporting the "disjoint" predicate. However, the particular test failure here is for the {{testContains}} method which tests the "contains" predicate which does _not_ use DocValues.  It would appear based on this fact that the bug is not in the spatial module.  How could it be?

It's out of scope in this issue to discuss why any particular SpatialStrategy implementation relies on UninvertingReader. I agree that all SpatialStrategies that do should be upgraded -- I'll file an issue for it.  But meanwhile, it seems to me there is a  bug in UninvertingReader, even if in a more perfect world, the spatial module wouldn't be using it in the first place.

> FieldCache related test failure
> -------------------------------
>
>                 Key: LUCENE-5713
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5713
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 5.0
>            Reporter: David Smiley
>
> The following reproduces for me and [~varunshenoy] on trunk:
> lucene/spatial %>ant test  -Dtestcase=SpatialOpRecursivePrefixTreeTest -Dtests.method=testContains -Dtests.seed=3AD27D1EB168088A
> {noformat}
> [junit4]   1> Strategy: RecursivePrefixTreeStrategy(SPG:(GeohashPrefixTree(maxLevels:2,ctx:SpatialContext.GEO)))
>    [junit4]   1> CheckReader failed
>    [junit4]   1>     test: field norms.........OK [0 fields]
>    [junit4]   1>     test: terms, freq, prox...OK [207 terms; 208 terms/docs pairs; 0 tokens]
>    [junit4]   1>     test: stored fields.......OK [8 total field count; avg 2 fields per doc]
>    [junit4]   1>     test: term vectors........OK [0 total vector count; avg 0 term/freq vector fields per doc]
>    [junit4]   1>     test: docvalues...........ERROR [dv for field: SpatialOpRecursivePrefixTreeTest has -1 ord but is not marked missing for doc: 0]
>    [junit4]   1> java.lang.RuntimeException: dv for field: SpatialOpRecursivePrefixTreeTest has -1 ord but is not marked missing for doc: 0
>    [junit4]   1> 	at org.apache.lucene.index.CheckIndex.checkSortedDocValues(CheckIndex.java:1414)
>    [junit4]   1> 	at org.apache.lucene.index.CheckIndex.checkDocValues(CheckIndex.java:1536)
>    [junit4]   1> 	at org.apache.lucene.index.CheckIndex.testDocValues(CheckIndex.java:1367)
>    [junit4]   1> 	at org.apache.lucene.util.TestUtil.checkReader(TestUtil.java:229)
>    [junit4]   1> 	at org.apache.lucene.util.TestUtil.checkReader(TestUtil.java:216)
>    [junit4]   1> 	at org.apache.lucene.util.LuceneTestCase.newSearcher(LuceneTestCase.java:1597)
> {noformat}
> A 1-in-500 random condition hit to check the index on newSearcher, hitting this.  DocValues used to not be enabled for this spatial test but [~rcmuir] added it recently as part of the move to the DocValues API in lieu of the FieldCache API, and because the DisjointSpatialFilter uses getDocsWithField (though nothing else).  That probably doesn't have anything to do with whatever the problem here is, though.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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