As part of a proof-of-concept for a bill-of-materials (BOM) explosion database in CouchDB, I used CouchDB-Lucene. Here are a few quick screenshots of how I got it to work. I will fill in the details in a future post.The sample document format shows an “item” that is made up of several “components” that are identified by a “part_number” and a “part_name.”

Next, here is the text of the index function used to index the items with components and each component’s parts details.

Finally, the search results from the following URL:
http://127.0.0.1:5984/_fti/local/bulk/_design/lucene/parts?q=part_name:in*&force_json=true&include_docs=true
