lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pouliot, Scott" <>
Subject RE: Getting an error: <field> was indexed without position data; cannot run PhraseQuery
Date Tue, 07 Mar 2017 01:26:50 GMT
Hmm.  We haven’t changed data or the definition in YEARS now.  I'll have to do some more
digging I guess.  Not sure re-indexing is a great thing to do though since this is a production
setup and the database for this user is @ 50GB.  It would take quite a long time to reindex
all that data from scratch.  Hmmmm

Thanks for the quick reply Erick!

-----Original Message-----
From: Erick Erickson [] 
Sent: Monday, March 6, 2017 5:33 PM
To: solr-user <>
Subject: Re: Getting an error: <field> was indexed without position data; cannot run

Usually an _s field is a "string" type, so be sure you didn't change the definition without
completely re-indexing. In fact I generally either index to a new collection or remove the
data directory entirely.

right, the field isn't indexed with position information. That combined with (probably) the
WordDelimiterFilterFactory in text_en_splitting is generating multiple tokens for inputs like
See the admin/analysis page for how that gets broken up. Term positions are usually enable
by default, so I'm not quite sure why they're gone unless you disabled them.

But you're on the right track regardless. you have to
1> include term positions for anything that generates phrase queries
2> make sure you don't generate phrase queries. edismax can do this if
you have it configured to, and then there's autoGeneratePhrasQueries that you may find.

And do reindex completely from scratch if you change the definitions.


On Mon, Mar 6, 2017 at 1:41 PM, Pouliot, Scott <> wrote:
> We keep getting this in our Tomcat/SOLR Logs and I was wondering if a simple schema change
will alleviate this issue:
> INFO  - 2017-03-06 07:26:58.751; org.apache.solr.core.SolrCore; 
> [Client_AdvanceAutoParts] webapp=/solr path=/select params={fl=candprofileid,+candid&start=0&q=*:*&wt=json&fq=issearchable:1+AND+cpentitymodifiedon:[2017-01-20T00:00:00.000Z+TO+*]+AND+clientreqid:17672+AND+folderid:132+AND+(engagedid_s:(0)+AND+atleast21_s:(1))+AND+(preferredlocations_s:(3799H))&rows=1000}
status=500 QTime=1480 ERROR - 2017-03-06 07:26:58.766; org.apache.solr.common.SolrException;
null:java.lang.IllegalStateException: field "preferredlocations_s" was indexed without position
data; cannot run PhraseQuery (term=3799)
>                 at$PhraseWeight.scorer(
>                 at$BooleanWeight.scorer(
>                 at
>                 at$BooleanWeight.bulkScorer(
>                 at
>                 at
>                 at
>                 at
>                 at
>                 at
>                 at
>                 at
>                 at org.apache.solr.handler.component.QueryComponent.process(
>                 at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
>                 at org.apache.solr.handler.RequestHandlerBase.handleRequest(
>                 at org.apache.solr.core.SolrCore.execute(
>                 at org.apache.solr.servlet.SolrDispatchFilter.execute(
>                 at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
>                 at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
>                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
>                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(
>                 at org.apache.catalina.core.StandardWrapperValve.invoke(
>                 at org.apache.catalina.core.StandardContextValve.invoke(
>                 at org.apache.catalina.core.StandardHostValve.invoke(
>                 at org.apache.catalina.valves.ErrorReportValve.invoke(
>                 at org.apache.catalina.core.StandardEngineValve.invoke(
>                 at org.apache.catalina.connector.CoyoteAdapter.service(
>                 at org.apache.coyote.http11.AbstractHttp11Processor.process(
>                 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
>                 at$
>                 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>                 at java.util.concurrent.ThreadPoolExecutor$ Source)
>                 at Source)
> The field in question "preferredlocations_s" is not defined in schema.xml explicitly,
but we have a dynamicField schema entry that covers it.
> <dynamicField name="*_s" type="text_en_splitting" indexed="true" 
> stored="true" />
> Would adding omitTermFreqAndPositions="false" to this schema line help out here?  Should
I explicitly define this "preferredlocations_s" field in the schema instead and add it there?
 We do have a handful of dynamic fields that all get covered by this rule, but it seems the
"preferredlocations_s" field is the only one throwing errors.  All it stores is a CSV string
with location IDs in it.
View raw message