Re: Why Lucene's Suggest API can ONLY load field terms which is Store.YES?

2019-12-27 Thread Mikhail Khludnev
On Fri, Dec 27, 2019 at 12:12 PM 小鱼儿 wrote: > But i feel very confused about this design: if i can search by some > indexable field, means there should be some terms stored somewhere, so i > should be able to get these terms as a Dictionary? > Right. Here we go MultiTerms.getTerms() > > Lucene

Re: Why Lucene's Suggest API can ONLY load field terms which is Store.YES?

2019-12-27 Thread 小鱼儿
But i feel very confused about this design: if i can search by some indexable field, means there should be some terms stored somewhere, so i should be able to get these terms as a Dictionary? Lucene docs says it uses the same field name for 2 kinds of index data store when set Store.YES, it

Re: Why Lucene's Suggest API can ONLY load field terms which is Store.YES?

2019-12-27 Thread Mikhail Khludnev
Hello, It's by design: StringFields are searchable and filled by analysis output, StoredFields are returned input values. That's it. On Fri, Dec 27, 2019 at 11:32 AM 小鱼儿 wrote: > I have a document `category` field, which is a "|,;" separator separated > string, in indexing phase, i do manually

Why Lucene's Suggest API can ONLY load field terms which is Store.YES?

2019-12-27 Thread 小鱼儿
I have a document `category` field, which is a "|,;" separator separated string, in indexing phase, i do manually split the value into atomic terms and index as StringField, & i also add a same name StoredField which contains original value form: *List terms =