Package org.apache.lucene.document

Examples of org.apache.lucene.document.Field.stringValue()


    assertEquals(f.stringValue(), "a b c");

    assertTrue(it.hasNext());
    f = (Field) it.next();
    assertEquals(f.name(), "zzz");
    assertEquals(f.stringValue(), "1 2 3");
    assertFalse(it.hasNext());
    r.close();
    w.close();
    d.close();
  }
View Full Code Here


            !oldName.startsWith("22.")) {

          if (d.getField("content3") == null) {
            assertEquals(5, fields.size());
            Field f = (Field) d.getField("id");
            assertEquals(""+i, f.stringValue());

            f = (Field) d.getField("utf8");
            assertEquals("Lu\uD834\uDD1Ece\uD834\uDD60ne \u0000 \u2620 ab\ud917\udc17cd", f.stringValue());

            f = (Field) d.getField("autf8");
View Full Code Here

            assertEquals(5, fields.size());
            Field f = (Field) d.getField("id");
            assertEquals(""+i, f.stringValue());

            f = (Field) d.getField("utf8");
            assertEquals("Lu\uD834\uDD1Ece\uD834\uDD60ne \u0000 \u2620 ab\ud917\udc17cd", f.stringValue());

            f = (Field) d.getField("autf8");
            assertEquals("Lu\uD834\uDD1Ece\uD834\uDD60ne \u0000 \u2620 ab\ud917\udc17cd", f.stringValue());
       
            f = (Field) d.getField("content2");
View Full Code Here

            f = (Field) d.getField("utf8");
            assertEquals("Lu\uD834\uDD1Ece\uD834\uDD60ne \u0000 \u2620 ab\ud917\udc17cd", f.stringValue());

            f = (Field) d.getField("autf8");
            assertEquals("Lu\uD834\uDD1Ece\uD834\uDD60ne \u0000 \u2620 ab\ud917\udc17cd", f.stringValue());
       
            f = (Field) d.getField("content2");
            assertEquals("here is more content with aaa aaa aaa", f.stringValue());

            f = (Field) d.getField("fie\u2C77ld");
View Full Code Here

            f = (Field) d.getField("autf8");
            assertEquals("Lu\uD834\uDD1Ece\uD834\uDD60ne \u0000 \u2620 ab\ud917\udc17cd", f.stringValue());
       
            f = (Field) d.getField("content2");
            assertEquals("here is more content with aaa aaa aaa", f.stringValue());

            f = (Field) d.getField("fie\u2C77ld");
            assertEquals("field with non-ascii name", f.stringValue());
          }
        }      
View Full Code Here

       
            f = (Field) d.getField("content2");
            assertEquals("here is more content with aaa aaa aaa", f.stringValue());

            f = (Field) d.getField("fie\u2C77ld");
            assertEquals("field with non-ascii name", f.stringValue());
          }
        }      
      } else
        // Only ID 7 is deleted
        assertEquals(7, i);
View Full Code Here

          it2 = fields2.iterator();
          while (it1.hasNext()) {
            Field curField1 = (Field) it1.next();
            Field curField2 = (Field) it2.next();
            assertEquals("Different fields names for doc " + i + ".", curField1.name(), curField2.name());
            assertEquals("Different field values for doc " + i + ".", curField1.stringValue(), curField2.stringValue());
          }         
        }
      }
     
      // check dictionary and posting lists
View Full Code Here

    doc = r.document(0);
    Iterator<Fieldable> it = doc.getFields().iterator();
    assertTrue(it.hasNext());
    Field f = (Field) it.next();
    assertEquals(f.name(), "zzz");
    assertEquals(f.stringValue(), "a b c");

    assertTrue(it.hasNext());
    f = (Field) it.next();
    assertEquals(f.name(), "aaa");
    assertEquals(f.stringValue(), "a b c");
View Full Code Here

    assertEquals(f.stringValue(), "a b c");

    assertTrue(it.hasNext());
    f = (Field) it.next();
    assertEquals(f.name(), "aaa");
    assertEquals(f.stringValue(), "a b c");

    assertTrue(it.hasNext());
    f = (Field) it.next();
    assertEquals(f.name(), "zzz");
    assertEquals(f.stringValue(), "1 2 3");
View Full Code Here

    assertEquals(f.stringValue(), "a b c");

    assertTrue(it.hasNext());
    f = (Field) it.next();
    assertEquals(f.name(), "zzz");
    assertEquals(f.stringValue(), "1 2 3");
    assertFalse(it.hasNext());
    r.close();
    w.close();
    d.close();
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.