8

getting query error on :

LNm:"PersonLastName III"

Response is: "field \"LNm\" was indexed without position data; cannot run PhraseQuery'

Schema is:

<field name="LNm" type="text_general" indexed="true" stored="true"/>

<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
    <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>

    <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
</fieldType>
cheffe
  • 9,345
  • 2
  • 46
  • 57
p1vande
  • 81
  • 1
  • 2
  • Did you already see this? http://lucene.472066.n3.nabble.com/quot-Indexed-without-position-data-quot-strange-exception-in-eDisMax-Solr-4-0beta-td4011220.html – arun Oct 24 '13 at 22:31

2 Answers2

17

This is because you changed field_type from string to text_general and didn't do a clean index. So indexer doesn't have necessary position data. First empty your core using

/your_core_name/update?stream.body=<delete><query>*:*</query></delete>&commit=true

then index this core.

Attention: the update code above will delete all your data in core and this cannot be undone!

KingCrunch
  • 128,817
  • 21
  • 151
  • 173
Can YILDIZ
  • 414
  • 3
  • 16
0

I also got same error because of using copyfields in "PF" parameter of solr. remove any copyfields from "PF" parameter ,It will work smoothly .

My Solr Schema => copyField source="name" dest="sname"

My SolrConfig file=> attr_Cuisines^20 sname^10 neighbourhood^5 subcats^10 tags^1 features^2

when I removed "sname" from "PF" parameter,it worked

Mahesh Varak
  • 129
  • 6