I have a few hundred entities with certain criteria associated with them. These criteria can be nested with ANDs and ORs. For a given input, entities which satisfy the conditions would be filtered out and used a response.
I have documents each with conditions or criteria which they need to satisfy to be part of the response based on values provided at runtime.
Say for eg, I have 2 documents which can be only seen by people who satisfy the given criteria
doc_1 : user needs to be logged in to the system AND he needs to be living in X area and should have Y balance in his wallet.
doc_2 : user needs to be living in X' area and should not have any complaints in the system in the last Z' days.
The above would be predefined and stored in the system.
The score of each document is evaluated by adding the score for each criteria in the doc using the following formula:
User Area Criteria: fixed_number1 * user score in the system
Current Wallet Criteria: fixed_number2 * (Money spent in last month/Current balance in wallet)
Complain Criteria: fixed_number3 * total complains in last month
At runtime, the input would be the user information like
In which area is he located now
What is his current wallet balance
The last date when the complain was registered against him in the system.
User score
Ratio of Money spent in last month and Current balance in wallet
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.