# \#index

**URL:** https://discuss.aerospike.com/tag/index/78.md

[Latest](https://discuss.aerospike.com/latest.md) · [Categories](https://discuss.aerospike.com/categories.md) · [Tags](https://discuss.aerospike.com/tags.md)

---

## [Filter expression formation for a nested Map field (C# Aerospike.Client 5.3.2)](https://discuss.aerospike.com/t/filter-expression-formation-for-a-nested-map-field-c-aerospike-client-5-3-2/11819)

<div class="topic-metadata">

**Author:** [@G\_Singh](https://discuss.aerospike.com/u/G_Singh)\
**Replies:** 5\
**Last updated:** [December 9, 2024, 8:15pm UTC](https://discuss.aerospike.com/t/filter-expression-formation-for-a-nested-map-field-c-aerospike-client-5-3-2/11819 "2024-12-09T20:15:33Z")

</div>

Hi there, Help is needed in creating filter expression on a set with below bins: bCustId (int) bMonth (Secondary index) bCategory (int) bOrdDtls (Map\<string, Map\<string, object\>\>) \[ { "status": "shipped", "propert…

---

## [Secondary Index - can a Value straddle nodes? Or all records for Value be on same Node](https://discuss.aerospike.com/t/secondary-index-can-a-value-straddle-nodes-or-all-records-for-value-be-on-same-node/11159)

<div class="topic-metadata">

**Author:** [@Rupinder\_Guron](https://discuss.aerospike.com/u/Rupinder_Guron)\
**Replies:** 2\
**Last updated:** [May 30, 2024, 1:37am UTC](https://discuss.aerospike.com/t/secondary-index-can-a-value-straddle-nodes-or-all-records-for-value-be-on-same-node/11159 "2024-05-30T01:37:51Z")

</div>

Hi, Given a Secondary-Index on a String, would it be prudent to assume for a bin with a Secondary Index (used to model one - to - many relationship ) – All records with One Value of the Bin would be on One Node ? It…

---

## [RecordExistsAction.CREATE\_ONLY and SendKey isnt working on Java Object Mapper](https://discuss.aerospike.com/t/recordexistsaction-create-only-and-sendkey-isnt-working-on-java-object-mapper/11111)

<div class="topic-metadata">

**Author:** [@vamsi.koneru1](https://discuss.aerospike.com/u/vamsi.koneru1)\
**Replies:** 6\
**Last updated:** [May 17, 2024, 4:10pm UTC](https://discuss.aerospike.com/t/recordexistsaction-create-only-and-sendkey-isnt-working-on-java-object-mapper/11111 "2024-05-17T16:10:44Z")

</div>

Hello, We are using Java Object Mapper to save and read the records from the Database. We have Configured our write policy to make sure we store the key in DB by using writePolicy.sendKey = true; and RecordExistsActio…

---

## [Searching for the index of specific AAID](https://discuss.aerospike.com/t/searching-for-the-index-of-specific-aaid/11046)

<div class="topic-metadata">

**Author:** [@Yash\_Mulchandani](https://discuss.aerospike.com/u/Yash_Mulchandani)\
**Replies:** 1\
**Last updated:** [May 2, 2024, 4:46am UTC](https://discuss.aerospike.com/t/searching-for-the-index-of-specific-aaid/11046 "2024-05-02T04:46:42Z")

</div>

Hi Folks, We are trying to fetch the index of data from the list without using the Full Scan on the record we will be having the AAID and we have to fetch the index of only that userId currently it is giving the index in…

---

## [In Java using Batch, query the data using the secondary index](https://discuss.aerospike.com/t/in-java-using-batch-query-the-data-using-the-secondary-index/11042)

<div class="topic-metadata">

**Author:** [@Tom](https://discuss.aerospike.com/u/Tom)\
**Replies:** 15\
**Last updated:** [May 1, 2024, 9:25pm UTC](https://discuss.aerospike.com/t/in-java-using-batch-query-the-data-using-the-secondary-index/11042 "2024-05-01T21:25:57Z")

</div>

Primary Key :: EmployeeIdValueEmployeeIdType Secondary Index :: AlternateEmployeeId 1.we are fetching all the keys from the input and storing it in the KeystoFetch. List\<String\> keysToFetch = new ArrayList\<\>(); …

---

## [Spring Data Aerospike - Multisite strong consistency - Read from local replica](https://discuss.aerospike.com/t/spring-data-aerospike-multisite-strong-consistency-read-from-local-replica/11034)

<div class="topic-metadata">

**Author:** [@shubham3582](https://discuss.aerospike.com/u/shubham3582)\
**Replies:** 3\
**Last updated:** [April 25, 2024, 11:18pm UTC](https://discuss.aerospike.com/t/spring-data-aerospike-multisite-strong-consistency-read-from-local-replica/11034 "2024-04-25T23:18:54Z")

</div>

Hi All, We are running 9 nodes aerospike cluster (3 nodes in each site - total 3 sites with rack-id 1,2 and 3 in strong consistency mode). Currently the reads (1 record or multiple records) response time is inconsistent…

---

## [Secondary Index query performance](https://discuss.aerospike.com/t/secondary-index-query-performance/10973)

<div class="topic-metadata">

**Author:** [@ekirianov](https://discuss.aerospike.com/u/ekirianov)\
**Replies:** 7\
**Last updated:** [April 11, 2024, 1:40pm UTC](https://discuss.aerospike.com/t/secondary-index-query-performance/10973 "2024-04-11T13:40:45Z")

</div>

Hi, I’m using single instance of Aerospike 5.6, holding approximately 25 millions of records (new records are constantly arriving, but they are set to expire in 30 minutes) in memory. Each record contains 30 bins and occ…

---

## [Filters record using the json property when json present in a bin](https://discuss.aerospike.com/t/filters-record-using-the-json-property-when-json-present-in-a-bin/10913)

<div class="topic-metadata">

**Author:** [@amanjain08](https://discuss.aerospike.com/u/amanjain08)\
**Replies:** 3\
**Last updated:** [March 21, 2024, 9:15pm UTC](https://discuss.aerospike.com/t/filters-record-using-the-json-property-when-json-present-in-a-bin/10913 "2024-03-21T21:15:20Z")

</div>

Hi, I have JSON stored in one bin with ‘data’ as key. Now I want to filter records based on one of the JSON property value. bin → "data" : { "entity\_id": "1234567", "store\_id": "", "sub\_merchant\_id": "", …

---

## [Range Query using Index of Type String](https://discuss.aerospike.com/t/range-query-using-index-of-type-string/10888)

<div class="topic-metadata">

**Author:** [@Rupinder\_Guron](https://discuss.aerospike.com/u/Rupinder_Guron)\
**Replies:** 2\
**Last updated:** [March 12, 2024, 5:28pm UTC](https://discuss.aerospike.com/t/range-query-using-index-of-type-string/10888 "2024-03-12T17:28:40Z")

</div>

Hi, Aerospike Rookie. aerospike client context: golang Use Case: we have a Set with a bin Time of data type String. We store Time String in the format specified by RFC-3339( YYYY-MM-DDThh:mm:ssZ), which is a specific…

---

## [findByIndexed fails "Id must not be null"](https://discuss.aerospike.com/t/findbyindexed-fails-id-must-not-be-null/10586)

<div class="topic-metadata">

**Author:** [@Hetal\_Rathod](https://discuss.aerospike.com/u/Hetal_Rathod)\
**Replies:** 6\
**Last updated:** [November 20, 2023, 5:02pm UTC](https://discuss.aerospike.com/t/findbyindexed-fails-id-must-not-be-null/10586 "2023-11-20T17:02:46Z")

</div>

Hi Team, Can anyone please help me on the below issue - I am trying to fetch an entity based on an indexed field. Spring Data is actually able to retrieve the entity from Aerospike DB but unfortunately, it is not sendi…

---

## [Does filter expression benifit from secondary index](https://discuss.aerospike.com/t/does-filter-expression-benifit-from-secondary-index/10200)

<div class="topic-metadata">

**Author:** [@dzhhh](https://discuss.aerospike.com/u/dzhhh)\
**Replies:** 3\
**Last updated:** [September 7, 2023, 3:38pm UTC](https://discuss.aerospike.com/t/does-filter-expression-benifit-from-secondary-index/10200 "2023-09-07T15:38:48Z")

</div>

Hi, I need to query data from a set with two bins, one is string type, the other is boolean type. Because of only one bin can be used as filter when query, I use the string-typed bin as filter, and make a filter expressi…

---

## [100% Read load test in zipfian distribution (80% operation on 20% data) with YCSB benchmark shows 3 times less IOPS. But improves after running 95% Read and 5% Update](https://discuss.aerospike.com/t/100-read-load-test-in-zipfian-distribution-80-operation-on-20-data-with-ycsb-benchmark-shows-3-times-less-iops-but-improves-after-running-95-read-and-5-update/10273)

<div class="topic-metadata">

**Author:** [@Sovit\_Patnaik](https://discuss.aerospike.com/u/Sovit_Patnaik)\
**Replies:** 3\
**Last updated:** [June 20, 2023, 11:50pm UTC](https://discuss.aerospike.com/t/100-read-load-test-in-zipfian-distribution-80-operation-on-20-data-with-ycsb-benchmark-shows-3-times-less-iops-but-improves-after-running-95-read-and-5-update/10273 "2023-06-20T23:50:53Z")

</div>

Hi Community, I am facing a very weird scenario while running 100% Read load test using YCSB specifically using Zipfian distribution (80% operations on 20% records) just after freshly loading the database with records. W…

---

## [Secondary index missing records, can it be repaired?](https://discuss.aerospike.com/t/secondary-index-missing-records-can-it-be-repaired/1366)

<div class="topic-metadata">

**Author:** [@hubt](https://discuss.aerospike.com/u/hubt)\
**Replies:** 8\
**Last updated:** [February 26, 2023, 10:58pm UTC](https://discuss.aerospike.com/t/secondary-index-missing-records-can-it-be-repaired/1366 "2023-02-26T22:58:13Z")

</div>

We have a situation where we recently upgraded a 3 node cluster from 3.4.1 to 3.5.9 and since the upgrade, secondary index queries sometimes fail to find records that we know are available by the primary index. The stat…

---

## [Why aerospike scan queries have been changed to be now called Primary Index queries?](https://discuss.aerospike.com/t/why-aerospike-scan-queries-have-been-changed-to-be-now-called-primary-index-queries/9651)

<div class="topic-metadata">

**Author:** [@Karan\_bir\_singh](https://discuss.aerospike.com/u/Karan_bir_singh)\
**Replies:** 1\
**Last updated:** [August 5, 2022, 5:41pm UTC](https://discuss.aerospike.com/t/why-aerospike-scan-queries-have-been-changed-to-be-now-called-primary-index-queries/9651 "2022-08-05T17:41:54Z")

</div>

In documentation it is mentioned that “SHOW SCANS” aql query gives “List running primary index (PI) queries (formerly known as scans):” If I do not specify a where clause in my query , then It is not using a primary k…

---

## [How to search MAPKEY index](https://discuss.aerospike.com/t/how-to-search-mapkey-index/9229)

<div class="topic-metadata">

**Author:** [@pradeepgururani](https://discuss.aerospike.com/u/pradeepgururani)\
**Replies:** 6\
**Last updated:** [February 17, 2022, 6:27am UTC](https://discuss.aerospike.com/t/how-to-search-mapkey-index/9229 "2022-02-17T06:27:04Z")

</div>

I have gone through https://download.aerospike.com/docs/guide/cdt-map-index-and-query.html page and successfully created an index on MAP bin. I can query as well from aql. However I am finding it difficult to write the …

---

## [Does data-in-index improve faster read access than memory-in-index?](https://discuss.aerospike.com/t/does-data-in-index-improve-faster-read-access-than-memory-in-index/8839)

<div class="topic-metadata">

**Author:** [@shan.p](https://discuss.aerospike.com/u/shan.p)\
**Replies:** 3\
**Last updated:** [October 5, 2021, 6:44pm UTC](https://discuss.aerospike.com/t/does-data-in-index-improve-faster-read-access-than-memory-in-index/8839 "2021-10-05T18:44:44Z")

</div>

I am designing a namespace with Aerospike configuration for fast reads. The data will be written in a batch maybe once a week. The data is an integer (0-100). This is my namespace design for now: namespace pc { …

---

## [Do we have redis like key tags in aerospike?](https://discuss.aerospike.com/t/do-we-have-redis-like-key-tags-in-aerospike/8591)

<div class="topic-metadata">

**Author:** [@Paras\_Malik](https://discuss.aerospike.com/u/Paras_Malik)\
**Replies:** 3\
**Last updated:** [July 6, 2021, 4:18pm UTC](https://discuss.aerospike.com/t/do-we-have-redis-like-key-tags-in-aerospike/8591 "2021-07-06T16:18:53Z")

</div>

do we have redis like key tags in aerospike ?

---

## [Select random records from a set](https://discuss.aerospike.com/t/select-random-records-from-a-set/8459)

<div class="topic-metadata">

**Author:** [@shreya](https://discuss.aerospike.com/u/shreya)\
**Replies:** 3\
**Last updated:** [May 22, 2021, 4:20am UTC](https://discuss.aerospike.com/t/select-random-records-from-a-set/8459 "2021-05-22T04:20:23Z")

</div>

I want to select a sample of random ‘n’ records from a set in the namespace. Is there a way to achieve this in Aerospike Query Language? In Oracle, we achieve something similar with the following query: SELECT \* FROM \<t…

---

## [Higher Latencies In Few Particular Nodes](https://discuss.aerospike.com/t/higher-latencies-in-few-particular-nodes/8233)

<div class="topic-metadata">

**Author:** [@Janardhanan\_V\_S](https://discuss.aerospike.com/u/Janardhanan_V_S)\
**Replies:** 3\
**Last updated:** [April 19, 2021, 9:18am UTC](https://discuss.aerospike.com/t/higher-latencies-in-few-particular-nodes/8233 "2021-04-19T09:18:16Z")

</div>

Hi, We are running a 4 node Aerospike cluster in AWS. We are using i3.2xlarge series of instances which come with 32GB Ram and 900GB of ephemeral volume. We are using a shadow ebs volume to replicate the writes as well.…

---

## [Is it possible to use primary key along with secondary key in Aerospike for fetching a record?](https://discuss.aerospike.com/t/is-it-possible-to-use-primary-key-along-with-secondary-key-in-aerospike-for-fetching-a-record/7537)

<div class="topic-metadata">

**Author:** [@Myst](https://discuss.aerospike.com/u/Myst)\
**Replies:** 7\
**Last updated:** [March 30, 2021, 5:11am UTC](https://discuss.aerospike.com/t/is-it-possible-to-use-primary-key-along-with-secondary-key-in-aerospike-for-fetching-a-record/7537 "2021-03-30T05:11:50Z")

</div>

Is it possible to use primary key along with secondary key. I want to get all records on the basis of primary key and then apply secondary index over it? Is it the correct way to do it or some other approach should be us…

---

## [How to get Key from Query Records](https://discuss.aerospike.com/t/how-to-get-key-from-query-records/7707)

<div class="topic-metadata">

**Author:** [@cogewo5048](https://discuss.aerospike.com/u/cogewo5048)\
**Replies:** 1\
**Last updated:** [August 3, 2020, 8:09pm UTC](https://discuss.aerospike.com/t/how-to-get-key-from-query-records/7707 "2020-08-03T20:09:10Z")

</div>

I am only getting a hashed value of Key, and not the actual key. How to get the key? stmt := as.NewStatement("test", "new\_table") f := as.NewRangeFilter("rs", 200, 210) stmt.SetFilter(f) r, \_ := client.Query(readP…

---

## [Definition of Set and Secondary Index in aerospike.conf](https://discuss.aerospike.com/t/definition-of-set-and-secondary-index-in-aerospike-conf/7640)

<div class="topic-metadata">

**Author:** [@fschaeffler](https://discuss.aerospike.com/u/fschaeffler)\
**Replies:** 1\
**Last updated:** [July 21, 2020, 5:40pm UTC](https://discuss.aerospike.com/t/definition-of-set-and-secondary-index-in-aerospike-conf/7640 "2020-07-21T17:40:54Z")

</div>

The configuration for the aerospike.conf here indicates that it’s possible to define a set within the context of namespace. Are there any other configuration options to it other than the name and the set-stop-writes-coun…

---

## [Use of the primary index](https://discuss.aerospike.com/t/use-of-the-primary-index/7561)

<div class="topic-metadata">

**Author:** [@tywu](https://discuss.aerospike.com/u/tywu)\
**Replies:** 3\
**Last updated:** [June 18, 2020, 8:04pm UTC](https://discuss.aerospike.com/t/use-of-the-primary-index/7561 "2020-06-18T20:04:36Z")

</div>

When writing to aerospike with “sendKey=true”, there will be a bin named “PK” in the record, is the primary index also on this bin? Based on the documentation, “The primary index is on the 20 byte hash called the digest …

---

## [java.net.SocketException: Connection reset, Error -8 on large set query](https://discuss.aerospike.com/t/java-net-socketexception-connection-reset-error-8-on-large-set-query/7458)

<div class="topic-metadata">

**Author:** [@nishant.nitjsr](https://discuss.aerospike.com/u/nishant.nitjsr)\
**Replies:** 7\
**Last updated:** [June 9, 2020, 6:47pm UTC](https://discuss.aerospike.com/t/java-net-socketexception-connection-reset-error-8-on-large-set-query/7458 "2020-06-09T18:47:28Z")

</div>

Hi, I am getting Connection reset error sometimes while querying a large set. I am using secondary index value (always 1) as a filter. This query should return approx ~1.5M record (all records in the set). I am using 4.…

---

## [Drop all secondary indexes](https://discuss.aerospike.com/t/drop-all-secondary-indexes/7366)

<div class="topic-metadata">

**Author:** [@Rod\_McCutcheon](https://discuss.aerospike.com/u/Rod_McCutcheon)\
**Replies:** 3\
**Last updated:** [June 9, 2020, 7:11am UTC](https://discuss.aerospike.com/t/drop-all-secondary-indexes/7366 "2020-06-09T07:11:46Z")

</div>

Today we maxed out the number of secondary indexes and get the following error using the Java client: com.aerospike.client.AerospikeException: Error Code 206: Create index failed: FAIL:206:Reached maximum number of sinde…

---

## [How to compute top X in last Y days?](https://discuss.aerospike.com/t/how-to-compute-top-x-in-last-y-days/7472)

<div class="topic-metadata">

**Author:** [@sajitlko](https://discuss.aerospike.com/u/sajitlko)\
**Replies:** 1\
**Last updated:** [June 8, 2020, 8:56am UTC](https://discuss.aerospike.com/t/how-to-compute-top-x-in-last-y-days/7472 "2020-06-08T08:56:11Z")

</div>

I am new to Aerospike. I want to show a widget on my site that shows the most visited 50 courses in last 7 days. I was thinking about how to get this data from aerospike. Can you suggest a suitable data model for the abo…

---

## [Is it recommended to use aerospike to filter on some field](https://discuss.aerospike.com/t/is-it-recommended-to-use-aerospike-to-filter-on-some-field/7264)

<div class="topic-metadata">

**Author:** [@ankitmittal](https://discuss.aerospike.com/u/ankitmittal)\
**Replies:** 1\
**Last updated:** [March 30, 2020, 6:06pm UTC](https://discuss.aerospike.com/t/is-it-recommended-to-use-aerospike-to-filter-on-some-field/7264 "2020-03-30T18:06:00Z")

</div>

I have around 2 millions records, each record having 10-12 fields(mostly are string). Now I want to filter records on the basis of some field. Is it advisable to do this using secondary index or some other better option …

---

## [Bulk Write - Read .Net Core](https://discuss.aerospike.com/t/bulk-write-read-net-core/7259)

<div class="topic-metadata">

**Author:** [@AhmetSekmen](https://discuss.aerospike.com/u/AhmetSekmen)\
**Replies:** 5\
**Last updated:** [March 28, 2020, 11:21pm UTC](https://discuss.aerospike.com/t/bulk-write-read-net-core/7259 "2020-03-28T23:21:34Z")

</div>

Hi i am newb on aerospike i have finished .net core documented tutorials I want to write and read bit large data(100 000 row record) with simple way. Shoul i have to use this technique ? Create keys one by one and re…

---

## [Composite keys for Aerospike](https://discuss.aerospike.com/t/composite-keys-for-aerospike/7207)

<div class="topic-metadata">

**Author:** [@vikrantl](https://discuss.aerospike.com/u/vikrantl)\
**Replies:** 2\
**Last updated:** [March 11, 2020, 1:33pm UTC](https://discuss.aerospike.com/t/composite-keys-for-aerospike/7207 "2020-03-11T13:33:49Z")

</div>

I got to know from the 2019 summit video that its possible to use ‘composite keys’ in aerospike. Where can I find the API reference and any examples? thank you -Vikrant

---

## [How to update the value of a record using PK value](https://discuss.aerospike.com/t/how-to-update-the-value-of-a-record-using-pk-value/4460)

<div class="topic-metadata">

**Author:** [@Ashu](https://discuss.aerospike.com/u/Ashu)\
**Replies:** 5\
**Last updated:** [January 22, 2020, 9:23am UTC](https://discuss.aerospike.com/t/how-to-update-the-value-of-a-record-using-pk-value/4460 "2020-01-22T09:23:57Z")

</div>

Hello i have test namespace,demo set and some records "email": "abc@gmail.com", "id": 12345 , "date": { "Jun": \[ "3", "4" \], "July": \[ "12", "7" \] } i want to update only “Jun” field with using PK value …

[Next page](https://discuss.aerospike.com/tag/index/78.md?match_all_tags=true&page=1&tags%5B%5D=index)
