How to search in json document in apache solr lucene

below is an example of json that was imported into solr, where id is unique and the json_doc field contains all json.

{"id": "cust_123", "json_doc": "{" \ first_name \ ": \" xyz \ ", \" Last_name \ ": \" ABC \ ", \" address \ ": \" # s3, Apple Store, New York, USA} \ "}"}

Now I want to search in a json document, for example, in the Apple store, as a request or New york as a request or in the USA .... and I have to get the document ...

Want to help define schema.xml for this type of request.

if you use a spatial tokenizer, then it will do tokenization in space ... therefore, if I look for an "apple store", then it will not match ....

Please help me

+5
source share
1 answer

Here's how to index JSON docs: http://wiki.apache.org/solr/UpdateJSON

And here's how to get the search results in a JSON document: http://wiki.apache.org/solr/SolJSON

If you, on the other hand, have some strange requirement to store the entire document in one field, please inform ...

+5
source

All Articles