title: Query time join using lucene + hibernate
body: <p>Using hibernate+jpa+lucene+spring boot.</p>
  
  <p>So I am trying to do query time join - searching parent by child properties. And as in documentation I tried:</p>
  
  <pre><code>JoinUtil.createJoinQuery("participantId", false, "experimentId", qq, indexSearcher, ScoreMode.None);
  </code></pre>
  
  <p>And got error: </p>
  
  <pre><code>`java.lang.IllegalStateException: unexpected docvalues type NONE for field 'participantId' (expected one of [BINARY, SORTED]). Use UninvertingReader or index with docvalues.`
  </code></pre>
  
  <p>(participantId is Long) I am not sure how to fix it. I tried using Bridges, etc. (inspirated by Google searche) but no success - still this error.</p>
  
  <ol>
  <li>I would like to use <code>UninvertingReader</code> - but did not find how to instatiate one.</li>
  <li>Same is for <code>docvalues</code> - do not know how to use it here.</li>
  <li>I feel like problem may be with <code>IndexSearcher</code> I use, cause I get it in kinda weird way:
  new <code>IndexSearcher(Search.getFullTextEntityManager(entityManager).getSearchFactory().getIndexReaderAccessor().open(Participant.class))</code></li>
  </ol>
  
  <p>Help me please )</p>
  
  <p>UPDATE.
  Currently solved by adding annotations:</p>
  
  <pre><code>@SortField
  @FieldBridge(impl = LongBridge.class)
  </code></pre>
  
  <p>to join fields... Not clear why this is required - without @FieldBridge annotations no error, but no search results as well.</p>