0
votes

In Lucene i want to store the full document as well which would be just stored and not analysed. What i want to do is something like _source in Elastic Search. But I'm confused as what would be the best data type in Lucene to store such data. What field type should I use in Lucene to store such data. Should it be a StringField or something else? I think elasticsearch stores _source as hex data. Not sure though. Which data type would take less space and still be fast enough to retrieve?

1

1 Answers

0
votes

As per this this part of the doc, it seems that Lucene treats each and every data type as:

opaque bytes

which could ideally convey that it doesn't really matter what type of field you're having as long as it's relative to your requirement, where Lucene would anyways convert them.

So deciding on which data type the field should be, totally depends on how do you want your fields to be in the index and also how're you gonna use them to visualize graphs in Kibana. Hope it helps!