title: Lucene query on @indexedEmbedded objects id
body: <p>Im trying to use a org.apache.lucene.search.Query to fetch all entries with a Object @indexedEmbedded with a certain @id id. This simply does not work with my current code. My code as follows:</p>
  
  <p><strong>The Search</strong></p>
  
  <pre><code>FullTextSession fullTextSession = getFullTextSession();
  QueryBuilder queryBuilder = fullTextSession.getSearchFactory().buildQueryBuilder().forEntity(Request.class).get();
  
  org.apache.lucene.search.Query query = queryBuilder.keyword()
                  .onField("keyword.id")
                  .matching(keywordId)
                  .createQuery();
  
  FullTextQuery fullTextQuery = fullTextSession
                  .createFullTextQuery(query, Request.class);
  
  return fullTextQuery.list();
  </code></pre>
  
  <p><strong>Request.class</strong></p>
  
  <pre><code>@Entity
  @Indexed
  public class Request etc etc..
  
      @ManyToOne
      @IndexedEmbedded
      private Keyword keyword;
  </code></pre>
  
  <p><strong>Keyword.class</strong></p>
  
  <pre><code>@Entity
  @Indexed
  public class Keyword etc etc..
  
      @Id
      @GeneratedValue
      private Long id;
  </code></pre>
  
  <p>I don't receive any errors when executing this code, the result just isn't restricted to the Request objects with a keyword with the supplied id.</p>
  
  <p>I use this in junction with a org.apache.lucene.search.BooleanQuery later on, but even when trying this itself it doesn't work. I'm aware that this might be the wrong approach so any suggestions would be appreciated. </p>
  
  <p>Thanks! </p>