lightcouch / LightCouch

CouchDB Java API
www.lightcouch.org
Apache License 2.0
67 stars 70 forks source link

Is it possible to get all document that start with perticular word #44

Closed jariwalabhavesh closed 9 years ago

jariwalabhavesh commented 9 years ago

we know that there is no concept like table in couchdb. record is stored as a document in couchdb.

So i create document id like word_id.

suppose i have docs having _id : Transacation_1,Transacation_2,Transacation_3 and so on.

now how can i get all the documents having _id start with Transacation.

any think is there in lightCouch that can work for it?

ahmedyha commented 9 years ago

I don't think there is an API out-of-the-box for this scenario. It's probably a design decision how to structure documents in CouchDB, instead of documents ids, you may consider emitting one or more keys to identify "Transactions" and leverage the power of Views for query.