Daniel, I had a similar issue. The option is not in the normal FieldType,
so I had to create my own FieldType in a Solr plugin that enabled payloads
in term vectors. This mostly involved extending TextField, copy pasting
"createField" from FieldType (TextField's parent class) and adding the one
line

public class PayloadTextField extends TextField {
    @Override
public IndexableField createField(SchemaField field, Object value, float
boost) {
            // copy-paste from FieldType.createField
            //...
            // this is the one-and-only line we change from what we inherit
newType.setStoreTermVectorPayloads(field.storeTermVector()); return
createField(field.getName(), val, newType, boost);
        }

}

Unfortunately there's no method to override to redifine the Lucene field
type that's used (newType) so you have to copy-paste this whole thing.


On Fri, Mar 21, 2014 at 9:53 AM, Daniel Jamrog <djamog2...@gmail.com> wrote:

> I see properties to enable term vectors, positions and offsets, but didn't
> find one for payloads?  Did I just miss it?   If not, is this something
> that may be added in the future?
>
> Thanks
>



-- 
Doug Turnbull
Search & Big Data Architect
OpenSource Connections <http://o19s.com>

Reply via email to