-----Original message----- > From:Michael McCandless <luc...@mikemccandless.com> > Sent: Thu 24-May-2012 13:15 > To: Markus Jelsma <markus.jel...@openindex.io> > Cc: solr-user@lucene.apache.org > Subject: Re: field "name" was indexed without position data; cannot > run PhraseQuery (term=a) > > I believe termPositions=false refers to the term vectors and not how > the field is indexed (which is very confusing I think...). > > I think you'll need to index a separate field disabling term freqs + > positions than the field the queryparser can query? > > But ... if all of this is to just do custom scoring ... can't you just > set a custom similarity for the field and index it normally (with term > freq + positions).
Yes, will do that. Thanks! > > Mike McCandless > > http://blog.mikemccandless.com > > On Thu, May 24, 2012 at 6:47 AM, Markus Jelsma > <markus.jel...@openindex.io> wrote: > > Thanks! > > > > How can we, in that case, omit term frequency for a qf field? I assume the > > way to go is to configure a custom flat term frequency similarity for that > > field. And how can it be that this error is not thrown with > > termPosition=false for that field but only with omitTermFreqAndPositions? > > > > Markus > > > > > > -----Original message----- > >> From:Michael McCandless <luc...@mikemccandless.com> > >> Sent: Thu 24-May-2012 12:26 > >> To: solr-user@lucene.apache.org > >> Subject: Re: field "name" was indexed without position data; > >> cannot run PhraseQuery (term=a) > >> > >> This behavior has changed. > >> > >> In 3.x, you silently got no results in such cases. > >> > >> In trunk, you get an exception notifying you that the query cannot run. > >> > >> Mike McCandless > >> > >> http://blog.mikemccandless.com > >> > >> On Thu, May 24, 2012 at 6:04 AM, Markus Jelsma > >> <markus.jel...@openindex.io> wrote: > >> > Hi, > >> > > >> > What is the intended behaviour for explicit phrase queries on fields > >> > without position data? If a (e)dismax qf parameter included a field > >> > omitTermFreqAndPositions=true user explicit phrase queries throw the > >> > following error on trunk but not on the 3x branch. > >> > > >> > java.lang.IllegalStateException: field "name" was indexed without > >> > position data; cannot run PhraseQuery (term=a) > >> > at > >> > org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:274) > >> > at > >> > org.apache.lucene.search.DisjunctionMaxQuery$DisjunctionMaxWeight.scorer(DisjunctionMaxQuery.java:160) > >> > at > >> > org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:589) > >> > at > >> > org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:280) > >> > at > >> > org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1518) > >> > at > >> > org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1265) > >> > at > >> > org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:384) > >> > at > >> > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:411) > >> > at > >> > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:204) > >> > at > >> > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) > >> > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1555) > >> > at > >> > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442) > >> > at > >> > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263) > >> > at > >> > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337) > >> > at > >> > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484) > >> > at > >> > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) > >> > at > >> > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) > >> > at > >> > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233) > >> > at > >> > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) > >> > at > >> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413) > >> > at > >> > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) > >> > at > >> > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999) > >> > at > >> > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) > >> > at > >> > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) > >> > at > >> > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) > >> > at > >> > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) > >> > at org.eclipse.jetty.server.Server.handle(Server.java:351) > >> > at > >> > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454) > >> > at > >> > org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47) > >> > at > >> > org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890) > >> > at > >> > org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944) > >> > at > >> > org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634) > >> > at > >> > org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) > >> > at > >> > org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66) > >> > at > >> > org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254) > >> > at > >> > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) > >> > at > >> > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534) > >> > at java.lang.Thread.run(Thread.java:662) > >> > > >> > > >> > Thanks > >> >