I was hoping for more of a discussion on how to get the searching working. And had not detailed the security in my description, as that was not the focus here. However, I'm thankful for your proactive assistance in the other areas. I would rather have people post potential serious issues, than let them go. So to respond to your concerns:
Any user who knows how to use reflection to edit your C# assemblies to make it send the data they want, can cheat?
Reflection has security as well, and is incredibly easy to implement where I want it. http://msdn.microsoft.com/en-us/library/system.security.permissions.reflectionpermission.aspx
Any client that knows how to form HTTPS requests can cheat?
The prior text had also included the encrypted key. First an SSL connection is established with the service, but then that service also requires a Key & Token, which is already encrypted. It does not matter if someone can connect to the SSL, they still need to login information, which is only established after the SSL is.
Language = C#
What I have not figured out how to do is search a Lucene database
Why does it matter what language a service is written in, if you just use it as-is? Solr has a HTTP interface. You POST to it, telling it to index things.
I was referring to the client side. As I originally posted that my code is in C#, the use of a Java Library is not very effective here. I was originally asking how to Search the database. I understand how to connect to it already, how to add things and get things based on a key or a key range.
I can read and write JSON to and from the service, and to and from objects.
I have Player's, and I get their info, but now I would like to get all CreatedBuildings with the (non-key field) PlayerId = the player in question.
You then GET (or POST) from it to search the index.
Indeed, I have already clarified that I know how to get and post based on the index, or the ID, a Key Index field.
What I am asking about is how to SELECT * WHERE BuildingOwnerPlayerId = "[playerId]" players can have many buildings. In SQL, this was dealt with by giving the PlayerBuilding Table a field called OwnerId or PlayerId. then executing the query "SELECT * FROM PlayerBuilding WHERE OwnerId = 'playername'". I'm trying to figure out how to repeat that in JSON through Lucene, or any library that can connect to it.
Nowhere in that situation do you need to know Java.
I have been looking for a way to search non-indexed/non-key fields in a JSON Database. Particularly Cloudant.com. This is on a C# client, I was asking if anyone knew of either a Library to search with, or preferably, just the protocol that I would use to connect with cloudant/JSON/lucene, in order to search a non-Key field.
However, from your descriptions, it sounds like you are a web or IT developer heading down game development in a catastrophe course. The architecture you describe is highly unlikely to actually be well suited to the real challenges to create multiplayer online games, bot from a performance point of view, and a anti-cheat point of view.
I mean no disrespect, but I have over 20 years of game development experience, including teaching Design/Programming/Physics/AI/sql at multiple colleges. The Architecture, if you look at the original statements,
I'm constructing a city builder game, which does not require network latency for most things and the client will connect directly to the database service.
You will see that the service does not need to bother a larger scale service. At the point where the multiplayer intereactions begin to increase to a point where data updates are not reasonable, I will implement a service to manage those sections as need be. I.e. Cloudant is a service that automatically grows, spans servers, and maintains speed as the data source gets huge. And nearly every call to a service I would have to host, would simply be making calls to the data source itself and essentially feed the nearly raw data back to the client. In this case, I can use this service directly. putting a service in the way would require me to setup my own redundancies, add additional network layers to bounce data around and cost more in hosting services, all while still using the same data calls the client could have made.
I understand from traditional networked gaming, I would use TCP or better, UDP with some form of packet control per delivery importance. In fact the first thing I built was a UDP client Server that was sending this information back and forth. But after a few messages programmed into it, It occured to me that everything I was doing was just delivering the data in near original condition. After a review of the security and data protection, I decided to go this route. If I find issues, I can alwys throw a service in between later, by changing out the messaging classes to ones that connect to a service instead.
the network latency on most calls to this service have been proving to be around 100ms or less. That will be fine for a City Builder.
Now, I'm hoping that this architecture explanation is out of the way, and that we can focus on the real issue:
I would like to be able to search through the JSON documents for alternate fields. If there is a way to hook up a secondary searchable index, that will work, but I need to know how to do it. If there is a way to simply do this through a special post or get, great, I can add a method for that in my code with ease.
At present, I'm going to take a Parent links to the children approach, by adding arrays to the parent nodes to hold references to the children. In SQL we do the reverse, where the child row carries references to the parent. So I'm changing my data model to match what appears to be how JSON handles this.
What I'd like to hear, is how to search CouchDB/Lucene/JSON via a query string, when the field I'm searching is not the ID/key index. Also, any suggestions if I'm using JSON incorrectly by using a parent linking to children approach in the data.