# Re: In search of elegant indices searching

**URL:** <https://www.ruby-forum.com/t/re-in-search-of-elegant-indices-searching/94867>\
**Category:** Ruby\
**Created:** [May 16, 2006, 8:59pm UTC](https://www.ruby-forum.com/t/re-in-search-of-elegant-indices-searching/94867 "2006-05-16T20:59:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 16, 2006, 8:59pm UTC](https://www.ruby-forum.com/t/re-in-search-of-elegant-indices-searching/94867/1 "2006-05-16T20:59:13Z")

</div>

Dear ‘uncutstone’, Dear Tim,

thank you for your replies - and the lot of work you put in it!

Actually,

> {‘x’=\>5,‘w’=\>4}=\>[4]  
> now it gets weird, this means the 4th position of x is 5 and of w is  
> 4… Why only that result? Seems a little arbitrary, why doesn’t the  
> result contain:  
> {‘x’=\>1,‘w’=\>2}=\>[1]?

You’re correct, I’d like to have it that way, actually - I am just too  
tired  
today even to make up an example correctly - but that doesn’t matter,  
if you can rely on friendly people 🙂

> And how come `y` is left out of the results alltogether?

That is done on purpose - I want to be able specify an Array  
of variables which are not fixed here - in this case [‘y’],  
in fact, one of the values of any of the variables must change  
in my data, but all of the others or some of the others can remain  
the same and I must account for that.

I think I can work with your proposals very well now.

Thank you,

Best regards,

Axel
