HowTo use Client Java API for Searching inside Documents
I have used in the past only SQL Databases but I'm very interested in NoSQL and want to use it for a new project.
I read the wiki/manual and tried a few example programs, but the main big problem I have is to understand how to implement a "search" with the Java API.
For example: My data consists of "customers" and "orders". Each customer can have multiple orders. Now I want to write a Java Client program with a search field and search button. When pressing the button the result should depend on the search field content. E.g. searching for "name" and "address" fields inside the customer document.
1. Is there a way to do it on the server side?
2. Or should I write a view document containing all customers fields for searching and doing the filtering on client side.?
3. How do I access a view from the Java API
4. Do I need the new Couchbase2.0 server or is it also possible to do it with the stable 1.8 version?
5. Is it better to create one document containing the "customer" data and all "orders" together or is it better to put only a reference to the orders inside the customer document?
Thank you for your help!