What makes you so sure?
I'll assume you are a strong supporter of the Second Amendment. Imagine a crime scene where the police find a gun that was used, still having a price tag attached to it that reads "Joe Bob's Guns".
You would not seriously suggest that the police have no right to go to Joe Bob's Guns and ask to see the record of who that gun was sold to, now would you?
Of course not. In that case, and in this case, the police had a good reason to ask for that record. The item was a piece of evidence of who committed a crime.
There is no government action related to the content of the book itself, they are not criminalizing reading a book. The police are trying to use the book as evidence of who was part of the operation to build a meth lab.
The only way that "right" exists is as a penumbra of an emanation of whatever was going through the judge's mind.