I do notice that there are 2 "ON"s in the statement, but I don’t think that is the issue here. There are a few possibilities:
When an index is created it may take some time to build. Until it is finished, the index will not return any results. It will result in an “Index not active” error. So this is not likely your case.
If you created the index using a specific type (you have “STRING” in your example), but the data in the bin (my_bin) is not a string, the record will not be indexed. Note here that in Aerospike, it is possible for different records to have different types for the same bin.
You should check to see that there are records in the set you are indexing. It is possible that the data are simply in another set or the set has not been used.
Also, please let us know which version you are using. If there is a bug, we will want to check on proper branch.
I m using Aerospike 3.
I just wonder it caused by the memory?
Because it sometimes creates indexes, and sometimes doesn’t.
But I don’t know yet what makes different result.
I also can not create index because following error occured:
Create index failed: FAIL:206:System already has maximum number of indexes, cannot create new index
I checked total count of indexes. There are 256 indices only.
Max count of index is 256?
In Aerospike document, it depends only memory. But my memory is sufficient enough.
This error occured on aerospike community 3.2, 3.4, 3.5.
Yes !! And limit is same for both Community and Enterprise.
The reason for this limit is knowing limit upfront certain things can be simplified server side. Can you please explain the use case where you need >256 indexes …
We sort and paginate data which returned by UDF (query with multiple filters). To do this
Filter using UDF (query with multiple filters)
In client side, sort all records which returned by UDF in 1st step
We tried sorting in UDF using lua. But it was not ordered correctly because unknown run time error
occured when 2 nodes was running.
In client side, paginate sorted records.
Recently performance was down caused by data increasing. So, we divided some tables using customer id. (some_table=> some_table1, … some_tableN. Here 1~N is customer id). It is like as partition in RDB. But new problem raised: com.aerospike.client.AerospikeException: Create index failed: FAIL:206:System already has maximum number of indexes, cannot create new index
We sort and paginate data which returned by UDF (query with multiple filters). To do this
Filter using UDF (query with multiple filters)
In client side, sort all records which returned by UDF in 1st step
We tried sorting in UDF using lua. But it was not ordered correctly
because unknown run time error occured when 2 nodes was running.
In client side, paginate sorted records.
Recently performance was down caused by data increasing. So, we divided some tables using customer id. (some_table=> some_table1, … some_tableN. Here 1~N is customer id). It is like as partition in RDB. But new problem raised: com.aerospike.client.AerospikeException: Create index failed: FAIL:206:System already has maximum number of indexes, cannot create new index
Currently there is not plan for increasing limit. I have been thinking about how to get around this problem.
Fundamental idea of need to partition data to get lesser row per selection can be achieved by logical partitioning data and create secondary index over each piece. This is what I believe you have been trying to do.
Alternative method could be creating secondary key such that query itself can filter some data which is not needed. E.g
If you are working with string index and your key looks like abc. You can prepend it with id id_abc. Similarly for integer …