lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: Trouble with phrase-queries on fields with omitTermFreqAndPositions (upgrading from 3.6.X to 4.1)
Date Mon, 04 Mar 2013 21:29:01 GMT
Sorry, but phrase queries really are dependent on position information, by 
definition. So, if you want phrase query, don't omit position info.

Yeah, the wiki should be updated to note that change about non-silent 

-- Jack Krupansky

-----Original Message----- 
From: Fredrik Rødland
Sent: Monday, March 04, 2013 6:14 AM
Cc: Finn - Teamsearch ; Kolstad Christopher
Subject: Trouble with phrase-queries on fields with omitTermFreqAndPositions 
(upgrading from 3.6.X to 4.1)

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 

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 
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 

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 scenes.
=> resolution: update schema to >= 1.4 and add 
autoGeneratePhraseQueries="true" to all other fields or types but <name> 

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