lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: How to get incrementPositionGap value from IndexSchema ?
Date Wed, 12 Mar 2008 00:47:30 GMT

: I am looking for a way to access the incrementPositionGap value defined for a
: field type in the schema.xml.

I think you mean "positionIncrementGap"

It's a property of the <fieldtype> in schema.xml, but internally it's 
passed to SolrAnalyzer.setPositionIncrementGap.  if you want to 
programaticly know what the "positionIncrementGap" is for any analyzer of 
any field or fieldtype regardless of wether or not it's a SolrAnalyzer, 
just use Analzer.getPositionIncrementGap(String fieldName) 

ie: myFieldType.getAnalyzer().getPositionIncrementGap(myFieldName)

If you don't mind me asking:  why do you want/need this information in 
your custom code?


View raw message