Hi Chris,
Thanks for your reply. Indeed, there is the getPositionIncrementGap
method, I forgot it.
I need this information to be able to configure my query processor. I
have extended Solr with a new query parser to be able to search document
on a sentence-based granularity. Each sentence is a fieldable instance
of a field 'sentences', and I execute span queries to be able to match a
boolean combination of terms on a sentence-level, not a document-level.
I hope this explanation is clear and makes sense.
Regards.
Chris Hostetter wrote:
: 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?
-Hoss
--
Renaud Delbru,
E.C.S., Ph.D. Student,
Semantic Information Systems and
Language Engineering Group (SmILE),
Digital Enterprise Research Institute,
National University of Ireland, Galway.
http://smile.deri.ie/