lucene 색인에서 Document
안에 Field
에 사용 된 토큰 (토큰 목록, TokenStream
또는 다른 것이 든)을 어떻게 얻을 수 있습니까? 즉, 인덱스에서 tokens
(예제)에 사용 된 토큰을 가져올 수 있습니까? 문서에서lucene 색인에서 필드 토큰 가져 오기
doc.add(new Field("title", tokens))
을 (내가 TokenStream
에서 토큰을 얻는 방법을 궁금해하고 있지 않다)이 Field.tokenStreamValue()
있어하지만 난 doc.getFieldable(field_name)
을 수행 할 때 단순히 null
을 반환합니다.
TokenSources.getTokenStream(reader, doc_id, field_name)
하지만
java.lang.IllegalArgumentException: title in doC#630does not have any term position data stored
at org.apache.lucene.search.highlight.TokenSources.getTokenStream(TokenSources.java:256)