0
我使用Lucene在我的Android應用程序搜索,但是當我運行一個複雜的查詢不返回該條款偏移。Lucene的不返回偏移複雜查詢
例如:
+content:"word" +(personid:NULL personid:123)
+content:"word" +(personid:NULL)
+content:"word" -personid:123
不會對 「字」 返回任何偏移。
+content:word
將返回偏移量。
這裏是我在各個領域
doc.add(new Field(PERSON_ID_FIELD, request.getPersonId(), Field.Store.YES, Field.Index.NOT_ANALYZED));
// we don't actually store the content here
doc.add(new Field(CONTENT_FIELD, request.getContent(), Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.WITH_OFFSETS));
我失去了我的東西存儲?我在查詢中需要做些什麼來補償偏移?
謝謝。
你是如何試圖檢索偏移? – jpountz
我收到了申請內容的TermVector,然後要求的偏移量爲查詢中的每個學期。 – Ge3ng
@jpountz由於只是我需要的問題。 – Ge3ng