The easiest solution - as long as you're just looking for matches as you describe - is to merge both values into a single field for filtering:
<arr name="provider_price">
<str>JMD__120</str>
<str>BBH__125</str>
<str>RBH__100</str>
</arr>
And then query with a filter query: fq=provider_price:JMD__100
.
Another option, as long as the number of fields aren't too great (using DocValues would probably help if the number of fields is large) - this will also allow you to range searches properly (which you also can do with the previous approach, as long as you prefix values to a given length with 0 so they're in the same lexical sort order):
<arr name="JMD_price">
<str>120</str>
</arr>
<arr name="BBH_price">
<str>125</str>
</arr>
<arr name="RBH_price">
<str>100</str>
</arr>
Querying: fq=JMD_price:100
The third option is to use a separate core for these queries:
<doc>
<int name="bookid">123</int>
<str name="bookname">java</str>
<str name="provider">JMD</str>
<int name="price">120</int>
</doc>
<doc>
<int name="bookid">123</int>
<str name="bookname">java</str>
<str name="provider">BBH</str>
<int name="price">125</int>
</doc>
<doc>
<int name="bookid">123</int>
<str name="bookname">java</str>
<str name="provider">RBH</str>
<int name="price">100</int>
</doc>
Query would then be fq=provider:JMD AND price:100
.
The fourth option is to use parent/child documents, but this will complicate any queries made against the index.