Am 23.04.2013 13:21, schrieb Michael McCandless: > Actually, term vectors can store payloads now (LUCENE-1888), so if that > field was indexed with FieldType.setStoreTermVectorPayloads they should be > there. > > But I suspect the TokenSources.getTokenStream API (which I think un-inverts > the term vectors to recreate the token stream = very slow?) wasn't fixed to > also carry the payloads through?
I use the following FieldType: private final static FieldType textFieldWithTermVector = new FieldType(TextField.TYPE_STORED); textFieldWithTermVector.setStoreTermVectors(true); textFieldWithTermVector.setStoreTermVectorPositions(true); textFieldWithTermVector.setStoreTermVectorOffsets(true); textFieldWithTermVector.setStoreTermVectorPayloads(true); So I suppose your assumption is right that the TokenSources.getTokensStream API is not ready to make use of this. I'm trying to figure out a way to use a query as Uwe suggested. My scenario is to perform a query and then retrieve some of the payloads upon user request, so there no obvious way to wrap this into a query as I can't know what (terms) to query for. Best, Carsten -- Institut für Deutsche Sprache | http://www.ids-mannheim.de Projekt KorAP | http://korap.ids-mannheim.de Tel. +49-(0)621-43740789 | schno...@ids-mannheim.de Korpusanalyseplattform der nächsten Generation Next Generation Corpus Analysis Platform --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org