问题
I am new to Lucene. I have worked on Lucene search using field value pairs in documents. Now there is a requirement to parse some JSON files and Index them up for Lucene search. I have an idea on working with simple form of JSON file according to this article.
But the JSON Structure I have to work with is little more complex than that. Any kind of idea will be appreciated.
Thanks.
回答1:
You basically can linearize your json and then index it as in article you've provided.
For instance, json like this:
{"key": {"hello": "world"}}
will be transformed into:
{"key.hello": "world"}
来源:https://stackoverflow.com/questions/51874022/indexing-multilevel-json-objects-in-lucene