lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fredrik Rødland <>
Subject Trouble with phrase-queries on fields with omitTermFreqAndPositions (upgrading from 3.6.X to 4.1)
Date Mon, 04 Mar 2013 11:14:42 GMT
We've been trying to get our heads around this for some days now upgrading from 3.6 (where
we didn't see this error) to 4.1 (where this error is very prominent.

We have upgraded from SOLR 3.6.1 to 4.1 and get the following error:
INFO [2013.03.04 09:22:40] http-12200-2 org.apache.solr.core.SolrCore - [finn] webapp=/solr
path=/select params={q=audi+a6&wt=json} status=500 QTime=14 
ERROR [2013.03.04 09:22:40] http-12200-2 org.apache.solr.servlet.SolrDispatchFilter - null:java.lang.IllegalStateException:
field "name" was indexed without position data; cannot run PhraseQuery (term=a)

<name> is a field which has omitTermFreqAndPositions="true" for several reasons.

We ran into several issues:

1. <name> was defined in our PF in our request handler (edismax)
=> resolution: delete it from PF

2. <name> has WordDelimiterFilter, and fails because WDF creates a phrase behind the
=> resolution: update schema to >= 1.4 and add autoGeneratePhraseQueries="true" to all
other fields or types but <name>  (phuu)

3. excplicit phrase-queries fail.  e.g a search for "audi oslo" fails with the error above.
=> no resolution - other than stop using omitTermFreqAndPositions

	omitTermFreqAndPositions=true|false <!> Solr1.4
"...Queries that rely on position that are issued on a field with this option will silently
fail to find documents."

This doesn't seem very silent to me.  We get a 500 error from SOLR.

Does anyone out there have any resolutions or tips for this problem.  We really wish to still
have the field defined with omitTermFreqAndPositions, have it defined in our qf and support
phrases for the end user.

On a side note: Jan Høydals excellent auto-complete solution:
also suffers from this - phrases are no longer supported, as noted in:



Fredrik Rødland               Mail:
                              Cell:    +47 99 21 98 17
                              Twitter: @fredrikr
Maisen Pedersens vei 1        Flickr:
NO-1363 Høvik, NORWAY         Web:

View raw message