[ https://issues.apache.org/jira/browse/LUCENE-5868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026769#comment-15026769 ]
Mikhail Khludnev commented on LUCENE-5868: ------------------------------------------ [~a_zelin] the patch make sense please pay attention to the following points: - http://wiki.apache.org/lucene-java/HowToContribute bq. and save them into the LUCENE-NNNN.patch file. bq. Read the patch file. Make sure it includes *ONLY* the modifications required to fix a single issue. - I suppose we need to cover all existing cases, ie. the scope of the issue should include: {{TermsCollector.MV, TermsCollector.SV, TermsWithScoreCollector.MV, TermsWithScoreCollector.MV.Avg, TermsWithScoreCollector.SV, TermsWithScoreCollector.SV.Avg}},... yepp too many, I see. - as an idea to avoid copy-paste by _bridging_ different DV types. {{NumericDocValues}} can be adapted to {{BinaryDocValues}} - such adapter can reuse {{BytesRefBuilder}} (giving that {{BytesRefHash}} copies bytes) - the same approach can be done with adapting {{SortedNumericDocValues}} to {{SortedSetDocValues}} - I suppose it's ok to keep it lenient: silently allow to shoot legs by having different DV types across segments. - As I understand, {{TestJoinUtilInt}} is just a first scratch. I suppose it's worth to accurately expand existing tests: -- I suppose {{TestJoinUtil.testSimple() testSimpleWithScoring()}} you can add {{from_num}} {{to_num}} fields into sample docs, and randomly switch these fields for passing into {{createJoinQuery()}} -- in {{TestJoinUtilInt}} you are trying to create numeric DV by {{setDocValuesType(DocValuesType.NUMERIC);}}, I don't belive it work, and it's handled by UnInvertingReader in run-time. So, I suggest to add {{NumericDocValuesField}} and {{SortedNumericDocValuesField}} (as mv case) explicitly. But let's randomly switch to existing approach (just add indexed field and rely on UnInvertingReader) just for smoke testing. I'll handle as separate issues: - extending {{TestScoreJoinQPScore.testSimpleWithScoring()}} for coverage - extending {{TestJoinUtil.test*ValueRandomJoin()}} for coverage Beside of the patch, for further consideration: if we could provide field types by something like Solr Schema/FieldTypes into JoinUtil. such issue would be autodone. > JoinUtil support for NUMERIC docValues fields > ---------------------------------------------- > > Key: LUCENE-5868 > URL: https://issues.apache.org/jira/browse/LUCENE-5868 > Project: Lucene - Core > Issue Type: New Feature > Reporter: Mikhail Khludnev > Assignee: Mikhail Khludnev > Priority: Minor > Attachments: qtj.diff > > > while polishing SOLR-6234 I found that JoinUtil can't join int dv fields at > least. > I plan to provide test/patch. It might be important, because Solr's join can > do that. Please vote if you care! -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org