question: public void testBasicsV6 ( ) throws Exception { Directory dir = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , dir ) ; Document document = new Document ( ) ; InetAddress address = InetAddress . getByName ( "fec0::f66d" ) ; document . add ( new InetAddressPoint ( "field" , address ) ) ; writer . addDocument ( document ) ; IndexReader reader = writer . getReader ( ) ; IndexSearcher searcher = newSearcher ( reader ) ; assertEquals ( 1 , searcher . count ( InetAddressPoint . newExactQuery ( "field" , address ) ) ) ; assertEquals ( 1 , searcher . count ( InetAddressPoint . newPrefixQuery ( "field" , address , 64 ) ) ) ; assertEquals ( 1 , searcher . count ( InetAddressPoint . newRangeQuery ( "field" , InetAddress . getByName ( "fec0::f66c" ) , InetAddress . getByName ( "fec0::f66e" ) ) ) ) ; reader . close ( ) ; writer . close ( ) ; dir . close ( ) ; }
target:  Add a single address and search for it 