Package org.apache.lucene.gdata.search.config

Examples of org.apache.lucene.gdata.search.config.IndexSchemaField


    int VALUE_GT_DEFAULT_INT = 10000;
   
    protected void setUp() throws Exception {
        this.schemaNoPerFielAnalyzer = new IndexSchema();
        this.schemaPerFielAnalyzer = new IndexSchema();
        IndexSchemaField field = new IndexSchemaField();
        field.setName("someField");
        field.setAnalyzerClass(StopAnalyzer.class);
        this.schemaPerFielAnalyzer.addSchemaField(field);
        this.schemaPerFielAnalyzer.setCommitLockTimeout(VALUE_GT_DEFAULT_LONG);
        this.schemaPerFielAnalyzer.setMaxBufferedDocs(VALUE_GT_DEFAULT_INT);
        this.schemaPerFielAnalyzer.setMaxFieldLength(VALUE_GT_DEFAULT_INT);
        this.schemaPerFielAnalyzer.setMaxMergeDocs(VALUE_GT_DEFAULT_INT);
View Full Code Here


     */
    public void testAddField() {
        assertEquals(0,this.delDocument.fields.size());   
        this.delDocument.addField(null);
        assertEquals(0,this.delDocument.fields.size());
        IndexSchemaField ifield = new IndexSchemaField();
        ifield.setContentType(ContentType.TEXT);
        this.delDocument.addField(ContentStrategy.getFieldStrategy(ifield));
        assertEquals(1,this.delDocument.fields.size());
    }
View Full Code Here

        entry.setId(ID);
        entry.setContent(new PlainTextConstruct(CONTENT));
        entry.setServiceConfig(new ProvidedServiceStub());
        IndexSchema schema = new IndexSchema();
        schema.setName("mySchema");
        IndexSchemaField field = new IndexSchemaField();
        field.setName(CONTENT_FIELD);
        field.setPath("/entry/content");
        field.setContentType(ContentType.TEXT);
        schema.addSchemaField(field);
        this.fineBuilder = new IndexDocumentBuilderTask(entry,schema,IndexAction.INSERT,true,true);
       
        /*
         * two fields, one will fail due to broken xpath.
         * One will remain.
         */
        schema = new IndexSchema();
        schema.setName("mySchema");
        field = new IndexSchemaField();
        field.setName("someContent");
        //broken xpath
        field.setPath("/entry///wrongXPath");
        field.setContentType(ContentType.TEXT);
        schema.addSchemaField(field);
        field = new IndexSchemaField();
        field.setName(CONTENT_FIELD);
        field.setPath("/entry/content");
        field.setContentType(ContentType.TEXT);
        schema.addSchemaField(field);
        this.failInStrategyBuilder = new IndexDocumentBuilderTask(entry,schema,IndexAction.INSERT,false,false);
        //fail with no fields
        schema = new IndexSchema();
        schema.setName("mySchema");
View Full Code Here

    ContentStrategy strategy;

    private IndexSchemaField field;

    protected void setUp() throws Exception {
        this.field = new IndexSchemaField();
        field.setName(FIELD);
        field.setStore(Field.Store.NO);
        field.setIndex(Field.Index.TOKENIZED);
        field.setBoost(BOOST);
        field.setPath("/path");
View Full Code Here

    private static final String FIELD = "foo";
    private static final float BOOST = 2.0f;
    ContentStrategy strategy;
    private IndexSchemaField field;
    protected void setUp() throws Exception {
        this.field = new IndexSchemaField();
        field.setName(FIELD);
        field.setStore(Field.Store.YES);
        field.setIndex(Field.Index.UN_TOKENIZED);
        field.setBoost(BOOST);
        field.setPath("/path");
View Full Code Here

TOP

Related Classes of org.apache.lucene.gdata.search.config.IndexSchemaField

Copyright © 2018 www.massapicom. 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.