title: Infinispan Hibernate search exception: org.hibernate.hql.ParsingException: HQLLUCN000003
body: <p>Using Infinispan 6.0</p>
  
  <p>Hi I have setup infinispan in embeded cache mode and I'm able to write to the cahce. Now I'm attempting to add indexing and it seems to all load properly but when I try to query my cache I get the following exception...</p>
  
  <p>org.hibernate.hql.ParsingException: HQLLUCN000003: No queries can be applied to property ABC in type com.xxx.model.MyModel since the property is analyzed.</p>
  
  <p>And I can't seem to find info on this error on google.</p>
  
  <p>Infinispan config...</p>
  
  <pre><code>&lt;namedCache name="XYZ"&gt;
      &lt;eviction strategy="LIRS" maxEntries="30000000" /&gt;
      &lt;indexing enabled="true" indexLocalOnly="true"&gt;
          &lt;properties&gt;
              &lt;property name="default.directory_provider" value="ram" /&gt;
          &lt;/properties&gt;
      &lt;/indexing&gt;
  &lt;/namedCache&gt;
  </code></pre>
  
  <p>The model is this...</p>
  
  <pre><code>@Indexed
  public class MyModel implements Serializable
  {
  private static final long serialVersionUID = -3764014970811943408L;
  
      Integer key;
      @Field
      @Field
      String ABC;
  }
  </code></pre>
  
  <p>My query is this...</p>
  
  <pre><code>Query query = qf.from(MyModel.class)
      .maxResults(20000)
      .having("ABC")
      .toBuilder().build();
  </code></pre>
  
  <p>The log output seems ok</p>
  
  <pre><code>DEBUG org.infinispan.jmx.JmxUtil - Object name org.infinispan:type=Cache,name="__cluster_registry_cache__(local)",manager="DefaultCacheManager",component=Cache already registered
  INFO  o.i.jmx.CacheJmxRegistration - ISPN000031: MBeans were successfully registered to the platform MBean server.
  DEBUG org.infinispan.CacheImpl - Started cache __cluster_registry_cache__ on null
  DEBUG o.i.interceptors.InterceptorChain - Interceptor chain size: 7
  DEBUG o.i.interceptors.InterceptorChain - Interceptor chain is:
      &gt;&gt; org.infinispan.interceptors.InvocationContextInterceptor
      &gt;&gt; org.infinispan.interceptors.CacheMgmtInterceptor
      &gt;&gt; org.infinispan.interceptors.NotificationInterceptor
      &gt;&gt; org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor
      &gt;&gt; org.infinispan.query.backend.LocalQueryInterceptor
      &gt;&gt; org.infinispan.interceptors.EntryWrappingInterceptor
      &gt;&gt; org.infinispan.interceptors.CallInterceptor
  DEBUG org.infinispan.jmx.JmxUtil - Object name org.infinispan:type=Cache,name="XYZ(local)",manager="DefaultCacheManager",component=Cache already registered
  INFO  o.i.jmx.CacheJmxRegistration - ISPN000031: MBeans were successfully registered to the platform MBean server.
  DEBUG org.infinispan.CacheImpl - Started cache XYZ on null
  </code></pre>
  
  <p>And then when I try to query...</p>
  
  <pre><code>WARN  o.h.search.impl.ConfigContext - HSEARCH000075: Configuration setting hibernate.search.lucene_version was not specified, using LUCENE_CURRENT.
  DEBUG o.h.s.b.impl.lucene.WorkspaceFactory - Starting workspace for index com.xxx.model.Transaction using an exclusive index strategy
  DEBUG o.h.s.e.s.DocumentBuilderIndexedEntity - Field selection in projections is set to true for entity com.xxx.model.MyModel.
  org.hibernate.hql.ParsingException: HQLLUCN000003: No queries can be applied to property ABC in type com.xxx.model.MyModel since the property is analyzed.
      at org.hibernate.hql.lucene.internal.ClassBasedLuceneQueryResolverDelegate.normalizeProperty(ClassBasedLuceneQueryResolverDelegate.java:218)
      at org.hibernate.hql.lucene.internal.ClassBasedLuceneQueryResolverDelegate.normalizePropertyPathTerminus(ClassBasedLuceneQueryResolverDelegate.java:208)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.pathedPropertyReference(GeneratedHQLResolver.java:13086)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.propertyReferencePath(GeneratedHQLResolver.java:12917)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.valueExpressionPrimary(GeneratedHQLResolver.java:7950)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.valueExpression(GeneratedHQLResolver.java:7483)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.rowValueConstructor(GeneratedHQLResolver.java:6377)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.predicate(GeneratedHQLResolver.java:5213)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.searchCondition(GeneratedHQLResolver.java:4858)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.searchCondition(GeneratedHQLResolver.java:4746)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.searchCondition(GeneratedHQLResolver.java:4746)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.searchCondition(GeneratedHQLResolver.java:4746)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.searchCondition(GeneratedHQLResolver.java:4746)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.searchCondition(GeneratedHQLResolver.java:4746)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.searchCondition(GeneratedHQLResolver.java:4746)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.whereClause(GeneratedHQLResolver.java:2348)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.querySpec(GeneratedHQLResolver.java:2203)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryExpression(GeneratedHQLResolver.java:2106)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatement(GeneratedHQLResolver.java:1745)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatementSet(GeneratedHQLResolver.java:1658)
      at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.statement(GeneratedHQLResolver.java:654)
      at org.hibernate.hql.ast.spi.QueryResolverProcessor.process(QueryResolverProcessor.java:52)
      at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:82)
      at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQueryBuilder.build(EmbeddedLuceneQueryBuilder.java:51)
      at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQueryBuilder.build(EmbeddedLuceneQueryBuilder.java:27)
      at com.xxx.vertx.Inifini.handle(Inifini.java:97)
      at com.xxx.vertx.Inifini.handle(Inifini.java:1)
      at org.vertx.java.core.eventbus.impl.DefaultEventBus$11.run(DefaultEventBus.java:929)
      at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:176)
      at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
      at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
      at java.lang.Thread.run(Thread.java:722)
  </code></pre>